00:00:33 | OrionPK | whatever works best |
00:04:56 | * | psquid quit (Ping timeout: 252 seconds) |
00:15:07 | * | AndChat|206976 joined #nimrod |
00:15:07 | * | vvbitt quit (Read error: Connection reset by peer) |
00:29:07 | Demos | anyone have a libarchive binding handy? |
01:06:38 | * | vvbitt joined #nimrod |
01:06:38 | * | AndChat|206976 quit (Read error: Connection reset by peer) |
01:31:46 | * | XAMPP joined #nimrod |
01:39:52 | vvbitt | Hi araq |
01:43:14 | * | DAddYE quit (Remote host closed the connection) |
01:47:50 | * | brson quit (Quit: leaving) |
01:48:23 | * | brson joined #nimrod |
01:53:40 | * | vvbitt quit (Read error: Connection reset by peer) |
01:53:41 | * | AndChat|206976 joined #nimrod |
01:54:45 | * | vvbitt joined #nimrod |
01:54:46 | * | AndChat|206976 quit (Read error: Connection reset by peer) |
02:05:01 | * | AndChat|206976 joined #nimrod |
02:05:01 | * | vvbitt quit (Read error: Connection reset by peer) |
02:06:41 | * | Demos quit (Read error: Connection reset by peer) |
02:13:29 | * | Demos joined #nimrod |
02:14:04 | dom96 | Looks like Araq's talk is finally public: http://www.infoq.com/presentations/nimrod :D |
02:14:22 | Demos | if I have a proc {.importc, dynlib: "foo.so", cdecl.} can I still use a static library and tell the compiler to ignore the import? what if I am on windows where libraries end in dll? |
02:16:21 | dom96 | when defined(windows): const dllName = "foo.dll" else: const dllName = "foo.so" |
02:17:18 | Demos | right, and what about substituting a static lib, I was thinking of a custom pragma that was a noop when some condition is true, like when useStatic: noop |
02:20:06 | dom96 | I think there is an --overrideDynlib option that you can use |
02:20:33 | dom96 | Demos: In case you missed it, Araq's talk is public now http://www.infoq.com/presentations/nimrod |
02:20:42 | Demos | I saw |
02:20:55 | OrionPK | heh rumpf |
02:20:56 | Demos | you posted that literally 5 mins ago |
02:21:18 | dom96 | Demos: Yes, but you weren't here when I posted it. |
02:21:24 | OrionPK | he's got such a stereotypical german accent |
02:21:29 | Demos | I was actually, I just connected |
02:22:02 | dom96 | Demos: According to my client you connected 40 seconds after I posted it here. |
02:22:27 | Demos | maybe my client on windows reconnected or something |
02:23:28 | Demos | wowah did the doc sidebar change color! |
02:25:25 | dom96 | well anyway. |
02:25:27 | dom96 | I should sleep. |
02:25:31 | dom96 | Good night |
02:27:41 | * | AndChat|206976 quit (Ping timeout: 272 seconds) |
02:28:07 | Demos | before you go I got a question about babel |
02:41:12 | * | psquid joined #nimrod |
02:44:53 | * | DAddYE joined #nimrod |
02:49:04 | * | DAddYE quit (Ping timeout: 246 seconds) |
03:17:19 | Demos | w00t, my binding to libalpm works |
03:17:29 | Demos | well it fails to crash |
03:33:41 | * | DAddYE joined #nimrod |
04:23:13 | * | BitPuffin quit (Ping timeout: 246 seconds) |
04:23:36 | * | Demos_ joined #nimrod |
04:24:58 | * | dmac quit (Quit: Leaving.) |
04:25:10 | * | dyu joined #nimrod |
04:25:42 | * | dmac joined #nimrod |
04:28:09 | * | dyu is watching Araq's talk |
04:30:44 | Demos_ | I liked it! I wish he talked more about his design process and rationale though |
04:33:24 | OrionPK | well that talk was meant to be focused on meta programming stuff iirc |
04:34:32 | * | DAddYE quit () |
04:39:33 | dyu | "what? oh no" ... |
04:40:08 | dyu | when the staff told him he has 10 minutes left :-) |
04:40:34 | dyu | that's gotta suck when you've got to speed up your talk all of a sudden |
04:40:52 | * | xenagi joined #nimrod |
04:41:31 | * | dmac quit (Quit: Leaving.) |
04:41:49 | discoloda | i tend to talk really fast when im doing something like that, just to get it over with |
04:52:59 | discoloda | he did a good job |
04:54:34 | dyu | yea he did |
05:22:23 | * | jimboj joined #nimrod |
05:24:38 | * | jimboj quit (Client Quit) |
05:29:35 | * | brson quit (Ping timeout: 260 seconds) |
05:36:31 | * | xenagi quit (Quit: Leaving) |
05:42:10 | * | dmac joined #nimrod |
05:42:28 | * | dmac quit (Client Quit) |
05:52:11 | * | dmac joined #nimrod |
05:52:12 | * | Demos_ quit (Quit: Leaving) |
05:58:06 | * | Demos quit (Remote host closed the connection) |
06:20:23 | * | dmac quit (Quit: Leaving.) |
06:27:58 | * | dmac joined #nimrod |
06:38:57 | * | psquid quit (Ping timeout: 265 seconds) |
06:39:14 | * | psquid joined #nimrod |
07:15:56 | * | vvbitt joined #nimrod |
07:31:52 | * | aftershave quit (Quit: Textual IRC Client: www.textualapp.com) |
07:32:17 | * | aftershave joined #nimrod |
07:32:33 | * | Mordecai joined #nimrod |
07:33:29 | * | psquid quit (Ping timeout: 272 seconds) |
08:40:33 | * | odc joined #nimrod |
08:57:15 | * | Araq__ quit (Read error: Connection timed out) |
08:58:05 | * | Araq_ joined #nimrod |
09:03:07 | * | j-renner joined #nimrod |
09:03:22 | * | vbtt joined #nimrod |
09:04:16 | j-renner | first time with nimrod, I can't get it to build on linux as per instructions |
09:05:30 | fowl | are you on ubuntu and trying to build 0.9.2? |
09:06:33 | j-renner | yep |
09:06:47 | j-renner | undefined reference to 'lrint' |
09:06:54 | j-renner | semfold.c |
09:07:16 | fowl | ubuntu's gcc is missing that |
09:07:26 | fowl | its fixed in nimrod on HEAD |
09:07:44 | j-renner | build from master should be ok then? |
09:08:06 | fowl | yea |
09:08:37 | j-renner | can I build with clang? |
09:10:25 | j-renner | apparently yes |
09:11:26 | fowl | yes i think so |
09:21:40 | * | vvbitt quit (Ping timeout: 245 seconds) |
09:33:38 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
09:37:00 | * | CarpNet joined #nimrod |
09:57:50 | * | ddl_smurf quit (Quit: ddl_smurf) |
10:06:58 | * | Araq_ quit (Read error: Operation timed out) |
10:08:06 | * | Araq_ joined #nimrod |
10:09:08 | * | dmac quit (Quit: Leaving.) |
10:10:59 | * | dmac joined #nimrod |
10:15:29 | * | dmac quit (Ping timeout: 265 seconds) |
10:51:30 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]) |
11:02:17 | * | dmac joined #nimrod |
11:09:19 | * | dmac quit (Ping timeout: 260 seconds) |
11:11:45 | * | Araq_ joined #nimrod |
11:12:28 | * | Araq_ quit (Client Quit) |
11:23:30 | * | BitPuffin joined #nimrod |
11:55:11 | * | faassen joined #nimrod |
11:59:43 | * | Araq_ joined #nimrod |
12:07:04 | * | dmac joined #nimrod |
12:11:51 | * | dmac quit (Ping timeout: 260 seconds) |
12:16:10 | dom96 | hello |
12:22:57 | * | Araq_ quit (Read error: Connection timed out) |
12:25:00 | * | Araq_ joined #nimrod |
12:25:01 | * | fowl quit (Read error: Connection reset by peer) |
12:25:20 | * | fowl joined #nimrod |
12:41:32 | odc | does someone here knows how to make statement macros? |
12:42:07 | dom96 | This may help: http://build.nimrod-lang.org/docs/manual.html#statement-macros |
12:42:30 | odc | i'm trying to implement `unless` which is simply `if (not())` |
12:42:45 | odc | dom96, other than that? |
12:43:12 | dom96 | use dumpTree to check what the ast for `if not x` looks like and then build it in the macro |
12:43:30 | dom96 | you could probably use a template to create `unless` |
12:43:43 | dom96 | instead of a macro |
12:43:55 | odc | you think it's possible? |
12:43:57 | zahary_ | template unless(x: expr, body: stmt): stmt = if(not x): body |
12:44:21 | odc | -_- |
12:44:29 | odc | thank you |
12:58:49 | * | Araq_ quit (Read error: Connection timed out) |
12:59:58 | * | Araq_ joined #nimrod |
13:07:11 | odc | just a small problem, when using this template, if i call return "something" in the body, nimrod says Error: no return type declared |
13:07:25 | * | dmac joined #nimrod |
13:07:50 | dom96 | try adding {.immediate, dirty.} to the template |
13:09:08 | odc | that works thx |
13:09:27 | odc | so many flags ;_; |
13:11:42 | * | dmac quit (Ping timeout: 252 seconds) |
13:21:48 | * | darkf quit (Quit: Leaving) |
13:24:21 | * | Araq_ quit (Read error: Connection timed out) |
13:25:01 | * | Araq_ joined #nimrod |
13:39:08 | * | j-renner quit (Quit: WeeChat 0.4.1) |
13:51:02 | odc | q: is there an equivalent of `!!x` to get the boolean value of x? |
13:52:34 | zahary_ | you can define it if you want, but the idiomatic way is to just check for nil, 0, etc |
13:53:58 | odc | hm ok |
14:07:40 | * | Araq_ quit (Read error: Connection timed out) |
14:07:43 | * | dmac joined #nimrod |
14:08:58 | * | Araq_ joined #nimrod |
14:12:21 | * | dmac quit (Ping timeout: 248 seconds) |
14:36:06 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]) |
14:42:32 | * | Araq_ joined #nimrod |
14:51:12 | * | Mordecai quit (Quit: work) |
14:51:33 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]) |
15:08:04 | * | dmac joined #nimrod |
15:12:27 | * | dmac quit (Ping timeout: 260 seconds) |
15:30:32 | * | [1]Endy joined #nimrod |
15:34:39 | NimBot | Araq/Nimrod devel 277df7f Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds using statement to the one and only true index. |
15:34:39 | NimBot | Araq/Nimrod devel 890f0e7 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds docstrings to lines() iterators. |
15:34:39 | NimBot | Araq/Nimrod devel 81c7a3d Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds note about procs and multiple variable assignment. |
15:34:39 | NimBot | Araq/Nimrod devel 3d6d210 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds note about iterators having same signature as procs. |
15:34:39 | NimBot | 10 more commits. |
16:03:57 | BitPuffin | aw Araq, nice talk, you were a good dragon |
16:05:31 | * | [2]Endy joined #nimrod |
16:07:59 | * | Demos joined #nimrod |
16:08:23 | * | dmac joined #nimrod |
16:08:55 | * | [1]Endy quit (Ping timeout: 260 seconds) |
16:12:40 | * | dmac quit (Ping timeout: 246 seconds) |
16:37:58 | * | shevy joined #nimrod |
16:38:03 | * | brson joined #nimrod |
17:08:53 | * | dmac joined #nimrod |
17:13:15 | * | dmac quit (Ping timeout: 252 seconds) |
17:29:04 | * | vbtt joined #nimrod |
17:31:53 | vbtt | hello, watching Araq's talk on infoq |
17:34:24 | dom96 | hey vbtt :) |
17:34:31 | vbtt | hi dom96 |
17:38:13 | vbtt | bikeshedding here, but I really like ':' before the proc body for indented procs. '=' for one line procs is fine. |
17:38:50 | Demos | are they both currently valid? |
17:39:04 | Araq | nope |
17:39:19 | Araq | vbtt: you should be able to see why that's not supported :P |
17:39:34 | vbtt | yeah |
17:39:44 | vbtt | the ':' has other uses? |
17:40:08 | vbtt | return type, for e.g. and this would look funny too `proc f(): int :` |
17:40:52 | Araq | bbl |
17:42:29 | * | dyu quit (Quit: Leaving) |
17:49:55 | * | Demos quit (Quit: Textual IRC Client: www.textualapp.com) |
17:59:38 | vbtt | very nice talk. |
18:00:00 | vbtt | Araq: you should do more :) |
18:00:23 | vbtt | nobody posted the video to reddit yet? |
18:11:09 | * | dmac joined #nimrod |
18:13:47 | Araq | vbtt: do more what? talks? |
18:14:44 | vbtt | Araq: yes. your infoq talk is very nice. |
18:15:14 | * | DAddYE joined #nimrod |
18:15:17 | vbtt | to the point, interesting and good demo of the language feature overloading the audience. |
18:15:30 | vbtt | i learnt more by watching it than browsing around the docs. |
18:15:44 | dom96 | vbtt: Araq told me not to post it. |
18:15:54 | dom96 | So i'm just waiting for his approval. |
18:16:08 | vbtt | dom96:ok |
18:18:09 | vbtt | sorry, meant *without* overloading the audience |
18:18:13 | vbtt | Araq: ^ |
18:18:48 | Araq | actually the audience was full of experts and so ... I could have raised the bar |
18:19:22 | vbtt | really? I thought you were pretty succinct? Also many more lesser experts will watch the video. |
18:20:14 | dom96 | In any case I think we should submit it and then upvote it simultaneously. |
18:20:42 | vbtt | dom96: what's your karma? |
18:21:00 | dom96 | 613 link karma |
18:21:08 | dom96 | and on HN 369 |
18:21:22 | dom96 | you can submit it if you want. |
18:21:36 | dom96 | I don't really care about karma |
18:22:10 | vbtt | no i was asking because if you have high karma then links you post will be higher to start out, no? |
18:22:16 | vbtt | i dont care about it either. |
18:22:30 | vbtt | actually, even if you dont post, in a fwe days someone else will. |
18:23:02 | dom96 | no, that's not how it works. |
18:23:16 | vbtt | also, i dont think you need to do the simultaneous votes. i'm pretty sure it will make it's way to the first page. new languages are always interesting, specially ones that are reasonably complete and *work* |
18:23:32 | dom96 | better to be safe than sorry |
18:23:34 | dom96 | especially on HN |
18:23:47 | vbtt | what about LTU? |
18:23:49 | dom96 | We will be off of /new on HN in ~30 minutes |
18:24:18 | * | CarpNet quit (Quit: Leaving) |
18:24:21 | dom96 | LTU doesn't really attract as much traffic as reddit or HN |
18:24:33 | vbtt | right, I'm more interested in generating quality discussion. |
18:25:42 | vbtt | anyway, the term rewriting stuff looks pretty powerful and elegant. It's almost like I can create a new language using nimrod metaprograming :) |
18:26:47 | vbtt | Araq: I was thinking about poking around at some coroutine type stuff. But is it possible to do stack pointer manipulation from within nimrod? |
18:26:48 | dom96 | Araq: So, do we have your approval? |
18:27:09 | dom96 | vbtt: I posted about Nimrod on LTU once and it hasn't generated much discussion. |
18:27:29 | Araq | dom96: yes |
18:27:56 | vbtt | dom96: yeah I saw that I think. the response was positive but low volume. |
18:28:09 | * | dmac quit (Quit: Leaving.) |
18:30:07 | Araq | vbtt: stack switching requires inline assembler |
18:30:19 | dom96 | Should I just make the title "Nimrod: A New Approach to Metaprogramming"? |
18:31:11 | Araq | make sure you also link to the PDF slides |
18:31:21 | Araq | and sure the title is fine |
18:31:29 | vbtt | Araq: yeah I suspected that. so different for every platform.. |
18:31:44 | * | dmac joined #nimrod |
18:32:19 | dom96 | https://news.ycombinator.com/item?id=7071429 |
18:33:08 | dom96 | http://www.reddit.com/r/programming/comments/1vdo3l/nimrod_a_new_approach_to_metaprogramming/ |
18:33:17 | vbtt | Araq: what about stack copying? you could use some tricks (address of local) to get the stack address and copy it around, no? |
18:33:25 | reactormonk | Araq, as mentioned, can you make the devel branch the default? |
18:33:46 | Araq | reactormonk: let me see |
18:33:49 | reactormonk | btw, how about some publicity on codegolf or similar? |
18:34:15 | OrionPK | Can user-defined type classes be used yet in the main branch? |
18:35:22 | dom96 | reactormonk: No, that will most likely break nimbuild. |
18:38:00 | dom96 | Araq: Good enough? http://www.reddit.com/r/programming/comments/1vdo3l/nimrod_a_new_approach_to_metaprogramming/cer7548 |
18:38:17 | reactormonk | dom96, where is that defined in nimbuild? |
18:38:58 | Araq | dom96: sure |
18:39:40 | Araq | reactormonk: can't find how to do that :-/ |
18:40:23 | reactormonk | Araq, ask the support |
18:41:27 | dom96 | oh, I see. I guess you want PRs to be made against devel now. |
18:41:35 | dom96 | Well it makes sense to make 'devel' default then. |
18:41:52 | dom96 | Araq: https://help.github.com/articles/setting-the-default-branch |
18:46:10 | Araq | dom96: lol that was easy |
18:46:21 | Araq | wait a sec |
18:46:40 | Araq | can we prune the history only for the devel branch? argh, no can't work |
18:47:02 | reactormonk | Araq, how so? |
18:47:35 | reactormonk | Might get messy to merge over master commits |
18:48:44 | reactormonk | wan, does the zmq you mentioned work with pub/sub? |
18:53:42 | Araq | brb |
18:54:58 | dom96 | Yeah, it's already almost off /new on HN. |
18:55:12 | dom96 | Now would be the time to upvote it. |
18:55:59 | odc | done |
18:57:29 | dom96 | Thanks :) |
18:57:31 | dom96 | bbl |
19:02:02 | * | shevy left #nimrod ("I'll be back ... maybe") |
19:02:12 | vbtt | btw you should link the video from nimrod-lang.org |
19:14:29 | vbtt | someone's blog about nimrod says "memory can still be managed manually even while the GC is enabled" |
19:14:33 | vbtt | what does it mean? |
19:14:45 | Araq | it means to use "ptr" |
19:14:50 | * | Mat3 joined #nimrod |
19:15:01 | * | OrionPK quit (Remote host closed the connection) |
19:15:05 | * | dymk joined #nimrod |
19:15:10 | Araq | hi Mat3 upvote us on hacker news, please |
19:15:15 | dymk | hello! |
19:15:28 | Mat3 | hi Araq, dymk and all |
19:15:30 | dymk | I saw the infoq talk post on Reddit; I thought it was really neat |
19:15:42 | Araq | hi dymk please upvote us then |
19:15:48 | dymk | I certainly did so |
19:16:06 | Mat3 | Araq: hacker news ? |
19:16:21 | dymk | I'd like to try writing a little side project in Nimrod I think; does Nimrod have HTTP libraries, and a library for RabbitMQ? |
19:16:50 | Araq | it has http client and server which must be pretty good since people constantly complain about it |
19:17:03 | Mat3 | a these hacker news |
19:17:58 | dymk | Araq, haha, well, okay then.. Would you consider them stable/solid, being the designer of the language? |
19:18:38 | Araq | orionpk has better ones ;-) |
19:19:08 | dymk | what's that? |
19:19:11 | * | OrionPK joined #nimrod |
19:19:15 | Araq | it's him |
19:19:26 | dymk | speak of the devil |
19:19:35 | dymk | OrionPK, I hear you've got HTTP client libraries |
19:19:44 | OrionPK | oh have I? |
19:19:49 | dymk | have you? |
19:19:58 | OrionPK | not sure what you mean |
19:20:12 | dymk | I'm gonna delegate this one to Araq then |
19:20:39 | Araq | OrionPK: I thought you have some vastly better httpclient module |
19:20:41 | OrionPK | http client library is kind of broad, I have lots of http servery type stuff |
19:20:51 | dymk | basically, I'm looking to write a side project in Nimrod, but I'd need an HTTP client library, and a RabbitMQ library |
19:20:57 | OrionPK | i havent done anything w/ http client, sorry |
19:21:03 | dymk | ah alright, thanks anyways |
19:21:06 | Araq | what's rabbitMQ ? |
19:21:22 | reactormonk | Araq, something like zmq from the sound of it |
19:21:27 | Araq | dymk: afaik gradha uses our httpclient and it works good enough for him |
19:21:36 | Araq | reactormonk: oh really? amazing |
19:21:43 | OrionPK | dymk what about libcurl? |
19:21:47 | dymk | Araq, rabbitmq is a message queue |
19:21:50 | reactormonk | Araq, :-P |
19:21:59 | OrionPK | http://nimrod-lang.org/lib.html#network-programming-and-internet-protocols |
19:22:19 | reactormonk | Araq, you really drank sarcasm with your mother's milk |
19:22:20 | OrionPK | http://curl.haxx.se/libcurl/ |
19:22:42 | OrionPK | reactormonk not sure if that translates to english well lol |
19:22:48 | dymk | libcurl is an option, yeah. Might look into that. |
19:23:04 | * | io2 joined #nimrod |
19:23:21 | vbtt | what language does the mother's milk thing come from? |
19:23:37 | Araq | german |
19:23:47 | reactormonk | OrionPK, kk, the correct translation is "you really imbibed sarcasm from your infancy" |
19:24:02 | OrionPK | :P |
19:24:09 | OrionPK | thats an awesome figure of speech |
19:24:21 | io2 | dom96: you missed the strangeloop tweet about nimrod metaprogramming :) |
19:24:22 | OrionPK | but figures of speech should be left in their mother tongue :p |
19:24:33 | reactormonk | OrionPK, nope |
19:24:44 | Mat3 | Araq: ok, domne |
19:24:47 | Mat3 | ^done |
19:24:51 | Araq | Mat3: thanks |
19:24:57 | Varriount | Hey guys. |
19:25:07 | Araq | now do the same for reddit, Mat3 :D |
19:25:23 | vbtt | interesting |
19:25:27 | reactormonk | dymk, any opinion on zmq? The lib in the stdlib doesn't work :-/ |
19:25:55 | dymk | reactormonk, I just started looking at zmq, it seem to be a "lighter weight" rabbitmq |
19:26:08 | dymk | yeah it'd work fine for me probably |
19:26:16 | dymk | but the bindings to it are broken, you say? |
19:26:17 | wan | reactormonk: yes, the zmq4 bindings I have work with pub/sub, I am using them for it |
19:26:30 | reactormonk | wan, could you create a babel package? |
19:26:41 | wan | Ok |
19:27:07 | Araq | let's remove it from the stdlib then |
19:27:12 | Araq | if it's broken |
19:27:13 | reactormonk | wan, ... and a PR to do that |
19:27:14 | wan | The current stdlib bindings work with zeromq v2 |
19:27:35 | reactormonk | well, we want to outsource that anyway AFAIK |
19:27:36 | wan | So dymk, if you have zeromq 3 or 4 on your system, it won't work |
19:27:57 | Araq | yeah, reactormonk is right, slim down the stdlib |
19:28:01 | dymk | ah bummer |
19:28:45 | wan | dymk: but I'll have this https://github.com/idlewan/nawak/blob/master/lib/zmq4.nim that you can use right away |
19:29:15 | dymk | oh that's awesome, thanks |
19:29:16 | wan | So I'll make a PR, and a babel package? Or just the PR? |
19:29:27 | reactormonk | wan, both |
19:29:35 | reactormonk | wan, and a few examples on how to use it |
19:29:47 | reactormonk | well, the PR is just to delete the old zmq.nim |
19:29:57 | Araq | Mat3: if you translate Add regA, regB, regC into call addImpl what do you do with the VM registers? |
19:30:34 | Araq | I mean translating the opcodes into "call opcodeImplementation" in the machine's assembler |
19:30:54 | Araq | how would you pass the instruction's arguments? |
19:31:01 | vbtt | yeah it would be nice if non-standard stuff is out of the stdlib |
19:32:18 | Mat3 | Araq: well, implicit parameters following typical directly after the call instruction because there can be fetched simply by poping the return address into a register |
19:32:38 | wan | dom96: We don't care any more to be off /newest, we're on HN's front page |
19:32:59 | * | XAMPP quit (Ping timeout: 272 seconds) |
19:33:04 | Mat3 | ^popping? |
19:33:36 | Araq | Mat3: can't follow, sorry, so you translate these into assembler too? |
19:35:49 | Mat3 | these method is called subroutine threading; A trace of VM instructions (which will fit into the 1st level cache) is translated into a stream of subroutine calls. Immediate parameters are inserted right after compiling the call instruction |
19:36:11 | Araq | yes exactly i'm talking about subroutine threading |
19:38:13 | Mat3 | if immediate arguments are compiled right after the call instruction, there can be fetched from the vm-instruction routine by simply loading them indexed though the stack pointer (or better just by popping each value from there) |
19:38:30 | Araq | yeah ok got it |
19:39:31 | Mat3 | this is both cheap in terms of the instructions needed as processed cycles |
19:41:30 | EXetoC | yup it's popping |
19:41:53 | Mat3 | hi EXetoC |
19:42:26 | EXetoC | Mat3: ohai |
19:42:37 | Araq | Varriount: why are you not in #nimbuild anymore? |
19:43:28 | reactormonk | wan, http://dpaste.com/1555149/ any reason why it doesn't recieve anything? |
19:44:21 | Varriount | Araq: Odd. My client must have not rejoined when I got disconnected |
19:45:52 | Araq | vbtt: there are various hacks in pure C to implement stack copying but they all have the same problem: (a) slow and (b) requires GC support unless you can live with GC_disable/enable and the mark&sweep GC |
19:49:16 | Mat3 | vbtt: I think at least two GCC related extensions are quite useful: The label-as-value extension and local function definations |
19:50:46 | vbtt | OK, is gcc a requirement for nimrod? |
19:51:04 | vbtt | I thought clang should always work too. |
19:51:27 | discoloda | clang can pretty much do what gcc does, missing a few minor extensions |
19:52:42 | Mat3 | As I know no problems using clang as compiler (ICC should also work but not tested) |
19:53:11 | vbtt | g2g, bbl |
19:53:15 | vbtt | thanks! |
19:53:16 | Varriount | Clang is yet another piece of software I could never get to compile natively on my computer. |
19:53:50 | Varriount | Why must I be left to depend on the whims of those who can release binaries? |
19:54:26 | Mat3 | ^you mean compiling clang itself or compiling Nimrod with clang ? |
19:54:57 | Varriount | Compiling clang itself. |
19:55:12 | * | mietek joined #nimrod |
19:55:32 | mietek | Hi |
19:55:37 | Mat3 | hmm, strange |
19:55:37 | Varriount | Hello! |
19:55:45 | Mat3 | hi mietek |
20:02:05 | * | io2 quit (Ping timeout: 272 seconds) |
20:03:18 | Mat3 | Varriount: Beside that LLVM + clang is a over complicated mess in my opinion, clang should compile easily, I just followed the build descriptions on there home page. Which system do you use ? |
20:03:36 | Varriount | Win64 |
20:04:47 | OrionPK | i was able to compile clang fine iirc |
20:06:03 | Mat3 | get cygwin and compile from there |
20:07:42 | reactormonk | Note that when you use a SUB socket you must set a subscription using zmq_setsockopt() and SUBSCRIBE |
20:07:44 | reactormonk | ok. |
20:12:00 | * | Mat3 thinking about creating a blog |
20:12:14 | reactormonk | how do I convert a string to a ptr string? With the whole allocation etc. |
20:12:18 | reactormonk | Mat3, gitflow? |
20:12:43 | Varriount | I've been meaning to ask, Mat3, what is it that you are working on? Something to do with assembly and documentation? |
20:13:22 | Araq | reactormonk: are you sure that's necessary |
20:13:38 | Araq | I managed to do without any copy from string iirc |
20:13:50 | Araq | for the zeromq wrapper |
20:13:57 | reactormonk | Araq, http://api.zeromq.org/3-2:zmq-setsockopt |
20:15:27 | reactormonk | Araq, https://github.com/hiteshjasani/Nimrod/commit/760e4d0f5bc6e4896e9a71214a9f3e1a3cde1745 looks good? |
20:15:56 | Mat3 | Varriount: I have created an interpreter/compiler environment implementing my own ISA (AVM) which I use as base for a Nimrod subset |
20:16:01 | reactormonk | Araq, setsockopt wants pointer to string / string len |
20:16:35 | Araq | reactormonk: just skimmed it, it's correct |
20:16:50 | NimBot | Araq/Nimrod devel 760e4d0 Hitesh Jasani [+0 ±1 -0]: Add docs for constraining and qualifying imports. |
20:16:50 | NimBot | Araq/Nimrod devel 7778e79 Simon Hafner [+0 ±1 -0]: Merge pull request #818 from hiteshjasani/pr_devel_doc_import_constraints... 2 more lines |
20:17:02 | Araq | reactormonk: so use cast[pointer](cstring(nimrodstring)), nimrodstring.len |
20:17:33 | wan | reactormonk: I used it like this: https://github.com/idlewan/nawak/blob/master/nawak_mongrel.nim#L54 |
20:17:53 | reactormonk | wan, I'll send over a PR |
20:18:13 | Mat3 | get some sleep, ciao |
20:18:18 | * | dymk quit (Quit: This computer has gone to sleep) |
20:19:04 | * | Mat3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
20:19:28 | reactormonk | How do I go from int to size_t? |
20:19:50 | wan | That's maybe the thing to change in the bindings I've made |
20:20:01 | reactormonk | wan, nah, just overload it |
20:20:26 | reactormonk | got (TConnection, int literal(6), string) - zmq4.setsockopt(s: PSocket, option: cint, optval: string): cint |
20:20:47 | reactormonk | ... wait. |
20:21:14 | reactormonk | cint <-> int problem? |
20:21:27 | wan | Araq says uint should be avoided, and for bindings, passing int to {.cdecl.} that expect uint/size_t is 'autoconverted' from what I understood. So I might change uint/size_t to ints in the bindings. |
20:21:45 | Araq | yeah please do so |
20:21:50 | Araq | size_t == Nimrod's int |
20:22:05 | reactormonk | wan, also use this: |
20:22:06 | Araq | wan: it's not restricted to 'cdecl' |
20:22:07 | reactormonk | proc setsockopt*(s: PSocket, option: cint, optval: string): cint = |
20:22:07 | * | io2 joined #nimrod |
20:22:09 | reactormonk | setsockopt(s, option, cast[pointer](cstring(optval)), optval.len) |
20:22:57 | Araq | reactormonk: TConnection vs PSocket seems your problem |
20:23:07 | reactormonk | oh |
20:24:13 | reactormonk | Error: type mismatch: got (PSocket, cint, pointer, int) |
20:24:19 | reactormonk | zmq4.setsockopt(s: PSocket, option: cint, optval: pointer, optvallen: size_t): cint |
20:24:50 | reactormonk | wan, I suppose that can go to the unofficial nimrod API as well, the modified setsockopt |
20:24:51 | wan | Yeah, for now, do optvallen.uint |
20:25:08 | wan | I'll change the uints |
20:25:31 | reactormonk | a macro to create a new proc from old proc + two names to pass the string to C api might be nice |
20:26:28 | wan | Yes, indeed |
20:26:52 | wan | Or just a proc should suffice |
20:26:54 | * | ehaliewicz joined #nimrod |
20:27:04 | Araq | hi ehaliewicz welcome |
20:27:11 | ehaliewicz | hi |
20:27:12 | reactormonk | works \o/ |
20:27:39 | reactormonk | now on to zlib |
20:29:12 | mietek | What exactly is nil in Nimrod? |
20:29:27 | Araq | mietek: the NULL pointer |
20:29:33 | mietek | The tutorial mentions it's also a "do nothing statement" |
20:29:46 | mietek | Is it really a statement, or an expression? |
20:29:48 | Araq | that's about to become deprecated |
20:29:51 | * | vendethiel quit (Quit: q+) |
20:29:56 | Araq | currently it's both |
20:29:56 | mietek | Good |
20:29:59 | reactormonk | Araq, \o/ |
20:30:26 | mietek | Araq: are you the principal designer of Nimrod? |
20:30:35 | Araq | yes |
20:31:03 | reactormonk | how do I convert Zlib::Inflate.new(Zlib::MAX_WBITS).inflate(data) to nimrod? |
20:31:20 | reactormonk | I don't find the MAX_WBITS constant |
20:31:40 | mietek | I'm very happy to see one more language besides Erlang with per-process heaps and message-passing |
20:32:58 | Araq | mietek: do you know how erlang's message passing is implemented? |
20:33:09 | Araq | because we had a discussion recently |
20:33:43 | mietek | I know a little, but I haven't dug through the VM sources |
20:33:56 | Araq | too bad ;-) |
20:34:04 | mietek | If you have questions, I know people who did |
20:34:40 | mietek | One thing I do know is Erlang binaries are often shared behind the scenes |
20:35:20 | mietek | There is no difference in behaviour to the programmer, though |
20:36:13 | reactormonk | apparently zlib doesn't come with a manual, does it |
20:38:21 | OrionPK | there's a zlib manual |
20:38:26 | OrionPK | http://www.zlib.net/zlib_how.html |
20:39:03 | reactormonk | Yeah, that's what I'm reading atm |
20:39:17 | reactormonk | gotta say, the ruby interface was simpler ;-) |
20:39:24 | * | dymk joined #nimrod |
20:39:33 | OrionPK | ive got some zlib nimrod code you might be able to use |
20:39:35 | OrionPK | if you want |
20:39:46 | reactormonk | \o/ |
20:39:51 | Araq | mietek: I don't really like erlang's model but it's harder to come up with something better if you care about thread local GC |
20:39:51 | reactormonk | inflating? |
20:40:12 | mietek | Araq: what don't you like about it? |
20:40:30 | Araq | message passing is for concurrency, not for parallelism |
20:41:18 | OrionPK | reactormonk i have deflating, not inflating |
20:41:28 | mietek | Fair enough |
20:41:36 | OrionPK | https://gist.github.com/onionhammer/8463022 |
20:42:26 | mietek | Araq: I'm also happy that you're at least aware of *ML and Haskell, which is more than I can say for the designers of Go... |
20:42:33 | * | shodan45 joined #nimrod |
20:42:35 | OrionPK | reactormonk note that this is for GZIP |
20:42:49 | Araq | mietek: well thanks :-) |
20:43:03 | mietek | Araq: what about nullable types, though? |
20:43:11 | mietek | Hoare's billion-dollar mistake? |
20:43:19 | Araq | yeah yeah yeah, I'll blog about it |
20:43:28 | Araq | it's getting annoying |
20:43:33 | mietek | I sincerely believe types should be explicitly annotated as nullable or not |
20:43:34 | reactormonk | OrionPK, hmmmm |
20:43:57 | Araq | mietek: we have "not nil" as an annotation and the compiler now checks against it, fwiw |
20:44:07 | mietek | Whether you call it Option (SML, OCaml), Maybe (Haskell), or Nullable (C#)... |
20:44:18 | Araq | the default is still "nilable" though |
20:44:27 | Araq | also |
20:44:32 | shodan45 | Araq: just watched your presentation :) |
20:44:38 | mietek | Araq: why is it the default? |
20:44:54 | reactormonk | mietek, will change with 1.0 I presume |
20:45:06 | Araq | yeah I guess |
20:45:25 | Araq | but "not nil" is NOT simple to do for a systems programming language |
20:45:29 | Araq | and no |
20:45:46 | Araq | just because Haskell and ML can do it easily doesn't mean it's easy for systems programming |
20:46:03 | mietek | Certainly. Have you looked at BitC? |
20:46:25 | Araq | yeah |
20:46:47 | mietek | I've held a certain amount of hope for it |
20:46:49 | OrionPK | reactormonk not much different |
20:46:51 | shodan45 | Araq: I particularly liked your flannel shirt :P |
20:46:59 | OrionPK | reactormonk the principle behind it is the same, but in reverse :p |
20:47:06 | Araq | shodan45: that's mean :P |
20:47:07 | OrionPK | reactormonk and w/o the header & footer of gzip |
20:47:10 | reactormonk | OrionPK, can you moonwalk? |
20:47:16 | OrionPK | what |
20:47:20 | mietek | Araq: http://www.bitc-lang.org/docs/papers/APLAS2008.html for one |
20:47:26 | reactormonk | OrionPK, the principle behind it is the same, but in reverse |
20:47:42 | Araq | mietek: what about Rust? |
20:48:03 | mietek | Rust loses from the beginning by not assuming GC |
20:48:07 | ehaliewicz | just a random question, but considering nimrod's focus on efficiency, is there any way to do runtime code generation, ala Common Lisp's compile? |
20:48:18 | OrionPK | reactormonk ah :p |
20:48:31 | Varriount | shodan45: You saw Araq ? |
20:48:49 | shodan45 | Varriount: http://www.infoq.com/presentations/nimrod |
20:49:00 | Varriount | :D |
20:49:12 | mietek | Araq: because of that, they decided they won't have tail-call optimisation |
20:49:24 | mietek | And there was something else recently which made me ignore it |
20:49:36 | Varriount | shodan45: Is this the rumored StrangeLoop presentation I've been waiting for? |
20:50:06 | * | faassen left #nimrod (#nimrod) |
20:50:09 | mietek | Araq: I still think it's possible to have a systems programming language with complete (not local-only) type inference |
20:50:13 | Araq | ehaliewicz: not really, but we'll soon have "eval" which compiles to bytecode |
20:50:16 | mietek | What's your view on type classes? |
20:50:40 | Araq | we're getting type classes or rather something close to them |
20:50:47 | ehaliewicz | Araq: interesting, thanks |
20:51:22 | Araq | mietek: nimrod is not about solving problems in type theory ;-) |
20:51:43 | mietek | Sure |
20:51:51 | mietek | It looks quite pragmatic, which I like |
20:51:56 | Araq | complete type inference for instance prevents many ways of adding adhoc typing rules etc. |
20:52:44 | reactormonk | remind me, how do I allocate and initialize a TZStream?https://github.com/Araq/Nimrod/blob/master/lib/wrappers/zip/zlib.nim |
20:53:03 | mietek | Araq: are you building Nimrod for your secret company? |
20:53:07 | reactormonk | ohh, fancy new syntax |
20:53:33 | Varriount | reactormonk: Where? |
20:53:37 | shodan45 | Araq: what I want to know is: can I code an AI with nimrod's templates & macros? so that I can compile a file with just "make me rich" in it, and it just works? :D |
20:54:12 | reactormonk | Varriount, it's rather old, I have to say |
20:55:00 | Araq | mietek: yes but don't hold your breath |
20:55:12 | Araq | life is complicated these days |
20:55:24 | Araq | in the long run everything looks rosey though |
20:55:34 | Araq | *rosy |
20:55:52 | mietek | I'm just interested what applications are there for Nimrod today |
20:55:55 | Varriount | future.add(genColor("rosy") |
20:55:59 | Varriount | *) |
20:56:08 | Varriount | mietek: Quite a lot |
20:56:36 | vbtt | Araq: bytecode, really? |
20:56:39 | Varriount | mietek: It *is* a multi-paradigm programming language, with many bindings (and a binding generator!) |
20:56:52 | Araq | shodan45: sure, nimrod's macros are turing complete |
20:57:16 | * | [2]Endy quit (Ping timeout: 272 seconds) |
20:57:33 | shodan45 | Araq: sweet :) |
20:57:36 | * | shodan45 gets to work on that |
20:57:57 | Araq | vbtt: devel branch already has vm.nim |
20:58:23 | Araq | and in case you wonder: yes it's very simple to add full coroutines to that |
20:58:30 | vbtt | wowz. any docs about what's supported? |
20:58:46 | vbtt | Araq: heh why didn't you tell me before!? |
20:58:46 | Araq | well it's the new macro evaluation engine |
20:59:07 | Araq | I thougth you already know :P |
20:59:10 | vbtt | I would've not bugged you about compiled coroutines :) |
20:59:36 | Araq | nah, we need them compiled |
20:59:45 | Araq | the FFI is still buggy as hell for the vm |
21:00:09 | vbtt | well that'll get fixed at some point.. |
21:00:47 | reactormonk | So how to I convert my string to a stream? |
21:01:44 | Araq | reactormonk: gzgets perhaps? |
21:02:19 | OrionPK | to a stream? |
21:02:33 | reactormonk | so I can go "gimme 10 bytes" incl. state |
21:02:37 | reactormonk | basically an iterator |
21:02:52 | reactormonk | err, "gimme the next 10 bytes". |
21:02:58 | Araq | reactormonk: var s: TZStream # declare the stream, init value might be fine |
21:03:00 | OrionPK | make a 10 byte string |
21:03:14 | OrionPK | actually its probably supposed to be a multiple of 16 kilobytes or something |
21:03:31 | reactormonk | I considered to just shove in the whole string every time |
21:03:46 | OrionPK | reactormonk just follow the inflate/deflate example |
21:03:51 | OrionPK | no the zlib page |
21:04:11 | OrionPK | on* |
21:04:19 | OrionPK | and follow what I did for nimrod |
21:04:21 | reactormonk | there's an example? |
21:04:45 | Araq | vbtt: supporting --gc:markAndSweep with multiple stacks is actually quite easy, it's the realtime gc which makes some problems |
21:04:50 | * | dymk quit (Quit: This computer has gone to sleep) |
21:05:06 | OrionPK | i linked it to you |
21:05:09 | Araq | speaking of which ... say we had first class "yield" already |
21:05:21 | Araq | how do you map epoll onto that? |
21:05:22 | OrionPK | https://gist.github.com/onionhammer/8463022 |
21:06:13 | vbtt | Araq: any coroutine support in nimrod will be extremely useful for concurrency. at the least it will help iron out the high level semantics. |
21:06:17 | * | dymk joined #nimrod |
21:06:31 | vbtt | you can optimize it for real time gc later if you want - I personally dont need that. |
21:07:05 | shodan45 | hm, anyone consider compiling nimrod into java? |
21:07:12 | vbtt | Araq: is the mark-and-sweep generational? |
21:07:48 | shodan45 | oh and anyone make an iOS app with nimrod? |
21:08:02 | * | ddl_smurf joined #nimrod |
21:08:37 | Araq | vbtt: no, it's primitive |
21:08:46 | Araq | I plan to make it parallel though |
21:09:12 | * | dymk quit (Client Quit) |
21:09:39 | Araq | or perhaps I'll implement this: http://www.cs.bell-labs.com/who/lorenz/papers/ismm98.pdf |
21:09:53 | reactormonk | OrionPK, my current problem is how to take chucks from the string. |
21:10:13 | Araq | shodan45: there is an example in the repo but it uses quite some Objective C |
21:10:22 | Araq | ask gradha when he's around |
21:10:46 | vbtt | Araq: primitive mark-and-sweep is fine too if I can control it - so I invoke it at regular intervals outside of the work it's doing. meanwhile other threads will be doing the work. |
21:11:37 | vbtt | basically each thread will loop: 1. process work in by spwaning a bunch of coroutines 2. stop processing work and run gc.collect() 3. repeat |
21:11:47 | vbtt | so the latency of the gc is not an issue. |
21:12:03 | Araq | shodan45: I explain in the FAQ that compiling to java is foolish |
21:13:38 | Varriount | So Araq, what are you working on at the moment? |
21:14:14 | shodan45 | Araq: I'm no fan of java, just curious because of android |
21:14:15 | * | dymk joined #nimrod |
21:14:34 | Araq | shodan45: we have an example for andriod too iirc |
21:14:35 | Varriount | shodan45: NDK |
21:14:59 | Araq | Varriount: I'm working on making the test suite green |
21:15:10 | Araq | so we can finally get 0.9.14 out |
21:15:11 | Varriount | Ooh, pretty. |
21:15:28 | vbtt | in fact I dont even need to run the gc, I could just kill the thread and spawn a new one. |
21:15:49 | shodan45 | Araq: :O |
21:15:59 | OrionPK | reactormonk just use substr or something then :p |
21:16:04 | Araq | vbtt: now that's easy |
21:16:05 | OrionPK | or copymem into the in buffer |
21:16:35 | reactormonk | OrionPK, yup, substr it is. |
21:17:08 | Araq | vbtt: please wrap some C coroutine library then, use gc:markAndSweep, disable it, enable it when it's safe and there you go |
21:18:25 | Araq | I'll gladly help when you're stuck |
21:19:51 | vbtt | ok I'll give it a shot when I find time. So the gc should be disabled when multiple coroutines are active because it can't traverse the suspended coroutine stack frames? |
21:20:17 | Araq | yeah but you can also easily add conservative stack marking for them |
21:20:43 | Araq | I don't have the time to do it either, but I have the time to help you ;-) |
21:21:55 | reactormonk | OrionPK, ttp://dpaste.com/1555262/ |
21:22:00 | reactormonk | that's what I came up with |
21:22:52 | OrionPK | you should probably clean up after you're done |
21:22:55 | vbtt | Araq:what is conservative stack marking? I add the object address to a list somewhere? Or twiddle a flag in the object? |
21:23:45 | OrionPK | also let new_data = data[index..index+CHUNK] |
21:23:46 | reactormonk | OrionPK, the GC doesn't take care of that? |
21:23:51 | OrionPK | seems... not good |
21:23:55 | OrionPK | no |
21:24:21 | Araq | you need to introduce an array/linked list where each entry contains the stack's address range and teach the gc to iterate over these stacks just like it iterates over the main stack |
21:25:26 | reactormonk | OrionPK, hm, I need two nested loops apparently |
21:25:36 | Araq | but oh you also need to teach your coroutines to set the current stack pointer when they "yield" otherwise it scans the whole stack region instead of the subset that's currently in use |
21:25:49 | OrionPK | yes you do |
21:25:58 | OrionPK | well, you should need 1 nested loop |
21:25:59 | Araq | this would otherwise produce many false positives |
21:25:59 | reactormonk | emdr.nim(34, 22) Error: ambiguous identifier: 'uint' -- use a qualifier |
21:26:01 | reactormonk | huh? |
21:26:21 | Araq | reactormonk: some shitty wrapper introduced its own "uint" |
21:26:24 | reactormonk | OrionPK, and a bit more error handling |
21:26:38 | reactormonk | Araq, most likely zlib ;-) |
21:27:41 | reactormonk | well, it does compile for now |
21:28:15 | reactormonk | yeah, segfault@s. |
21:28:26 | OrionPK | yeah |
21:28:34 | OrionPK | the zlib wrapper kinda.. isnt nice |
21:37:15 | * | deniska joined #nimrod |
21:38:31 | * | deniska left #nimrod (#nimrod) |
21:40:33 | OrionPK | who wrote the libuv wrapper? http://nimrod-lang.org/libuv.html |
21:40:55 | Araq | dunno perhaps zahary |
21:41:16 | OrionPK | yeah, it was zahary |
21:41:28 | OrionPK | egad, 2 years ago |
21:41:28 | * | Demos joined #nimrod |
21:41:32 | OrionPK | probably massively out of date |
21:41:39 | zahary | I wrote the first one, but DAddYE created a newer version at some point |
21:42:04 | zahary | search github for node.nim IIRC |
21:42:12 | OrionPK | mm, interesting |
21:42:15 | OrionPK | is it on babel? |
21:42:28 | OrionPK | nope.. |
21:42:51 | Demos | can we just un-export that shitty symbol? |
21:45:50 | Araq | import foo except shit |
21:46:46 | Demos | speaking of babel, what is the recommended path for getting wrappers up there? I wrote a wrapper for libalpm last evening that could be useful for someone (maybe even babel itself :D). And I was going to say removing the * from that symbol in the library, it sounds like a mistake to export something called uint at all. |
21:47:03 | OrionPK | submit a pull request |
21:47:11 | OrionPK | and bug dom96 until he bothers to merge it |
21:47:52 | Demos | heh yeah. I will test it a bit more. It would be badass to have babel use libalpm though! (I just want uninstall functionality :D) |
21:49:47 | Araq | imho dom96 should give somebody else write access to babel, so he doesn't need to merge everything himself |
21:50:09 | OrionPK | i still think we should do the sub-list idea |
21:50:14 | Demos | well I am not convinced that a github repo is a good place to put a package database |
21:50:35 | reactormonk | meh, the c2nim fails at http://www.zlib.net/zpipe.c |
21:50:40 | OrionPK | e.g. his package list could add references to other people's package lists |
21:50:54 | OrionPK | and then babel would get 1 extra level |
21:51:09 | Demos | reactormonk why are you converting a C file anyways? just convert the header and importc stuff |
21:51:29 | OrionPK | "trusted" publishers then can upload packages as they please and cant touch anyone else's |
21:51:50 | Demos | I like the idea of babel becoming a alpm repo, as a bonus you could add it to your pacman sources if you have arch |
21:52:18 | reactormonk | Demos, so I can compare their sources ot ours |
21:52:47 | EXetoC | interesting |
21:56:41 | EXetoC | Demos: simplicity might've played a part in that decision |
21:57:05 | Demos | yeah, that is what I figured |
21:57:43 | Demos | I like alpm because it does some really neat stuff in a pretty simple and usable way |
21:57:47 | Demos | also I like good C code |
22:05:39 | Araq | zahary: https://github.com/Araq/Nimrod/pull/819 makes a nice example for AOP |
22:05:49 | bstrie | Araq: I see people mentioning nimrod's "GC", are they just misrepresenting the deferred RC or does nimrod actually have a GC? |
22:06:28 | reactormonk | bstrie, yup, there's a GC. |
22:06:29 | Araq | bstrie: deferred RC is a form of GC but nimrod has 2-5 GCs depending on how you count them |
22:06:38 | bstrie | ah ok, I thought it was deferred RC all the way |
22:06:43 | bstrie | very interesting |
22:07:05 | Araq | the primary gc is deferred rc with a cycle collector |
22:10:14 | TylerE | Araq - got a link to your article about the compiler proving purity of procs? |
22:12:21 | Araq | TylerE: not sure what you mean, I guess you mean this: http://nimrod-lang.org/blog/writetracking.html |
22:12:35 | Araq | but please note that this is not yet implemented |
22:12:54 | TylerE | ahh, yea, that's the one |
22:12:55 | TylerE | thanks |
22:13:11 | Araq | though I'm quite sure by now the algorithm is sound, albeit the description of it could be more detailed |
22:13:15 | * | brson quit (Ping timeout: 276 seconds) |
22:16:45 | * | odc quit (Ping timeout: 252 seconds) |
22:17:59 | Araq | TylerE: I think the algorithm can be extended to compute "lent" pointers |
22:18:27 | TylerE | that'd be interesting |
22:24:07 | Araq | a pointer parameter "p" is not lent iff there is an assignment of the form path(q) = x where (x in writeset(p)) and q is a parameter, global or a thread local variable |
22:26:01 | Araq | (or if it's passed as a not lent pointer to some other routine) |
22:26:33 | reactormonk | how do I place a condition at the end of a loop? |
22:26:48 | Araq | reactormonk: while true: foo; if bar: break |
22:30:45 | reactormonk | can I have a random finally block to ensure the cleanup happens? |
22:31:40 | reactormonk | aww, I can't do raise <string>? |
22:32:26 | Araq | raise newException(EBase, "lazy guy") |
22:32:55 | reactormonk | Can I write an issue about that? |
22:33:47 | Araq | no? |
22:34:06 | Araq | raising strings has been deprecated in python and removed in python 3 |
22:34:13 | Araq | why do we want to introduce it? |
22:34:28 | reactormonk | convert it to an EBase |
22:34:43 | Araq | you know what I think of converters |
22:35:25 | reactormonk | template raise(message: string) = raise newException(EBase, message) |
22:36:05 | Araq | "raise" is a keyword :P |
22:36:19 | Araq | make it sraise |
22:36:46 | reactormonk | can't overload keywords? :-( |
22:37:10 | Araq | no. but you can do template `!!!`(msg: string) ... |
22:37:16 | Araq | !!!"argh" |
22:38:09 | reactormonk | would you accept that into stdlib? ;-) |
22:38:17 | Araq | nope |
22:38:38 | reactormonk | figured. |
22:38:59 | reactormonk | hmm, this zlib goes out of memory, at least it says so |
22:39:49 | reactormonk | maybe I should increase the loop counter |
22:42:07 | reactormonk | but nimrod accepted my finally: clause flawlessly |
22:42:51 | Araq | that's something at least |
22:43:24 | reactormonk | works \o/ |
22:43:46 | reactormonk | OrionPK, http://dpaste.com/1555381/ |
22:43:48 | OrionPK | it would be nice if newException didnt need a first param |
22:44:03 | OrionPK | but im just lazy |
22:44:20 | vbtt | couldn't you just make a closure? |
22:44:22 | reactormonk | Araq, ^ overload it? |
22:44:25 | reactormonk | vbtt, huh? |
22:44:46 | OrionPK | reactormonk you're still doing new_data = data[index..index+CHUNK] |
22:44:51 | reactormonk | OrionPK, soooo what? |
22:44:56 | Araq | OrionPK, reactormonk you're doing it wrong |
22:45:12 | reactormonk | the master has spoken. |
22:45:27 | OrionPK | what'd i do now |
22:45:56 | Araq | template check(x: expr) = if x != librarySpecificReturnCode: raise newException(librarySpecificException, librarySpecificErrorMessageGetter()) |
22:46:11 | reactormonk | Araq, it's not lib code yet |
22:46:15 | Araq | check stupidCapi(a ,b) |
22:46:39 | Araq | check anotherGuyFromThe70iesCalled() |
22:46:52 | Araq | check heWantsExceptionsForC() |
22:47:14 | * | brson joined #nimrod |
22:47:21 | OrionPK | is string[0...4] a shortcut for substr? |
22:47:26 | reactormonk | yup |
22:47:36 | OrionPK | hm, ok |
22:47:48 | * | dymk quit (Quit: This computer has gone to sleep) |
22:47:56 | reactormonk | OrionPK, wanna combine the two into a nice looking lib? |
22:48:19 | OrionPK | i considered writing a higher level zlib based library |
22:48:35 | OrionPK | but be my guest |
22:48:36 | OrionPK | :p |
22:48:39 | reactormonk | now you have something to start with |
22:49:06 | reactormonk | OrionPK, you could just take the ruby C bindings and copy them to a certain degree |
22:49:53 | Araq | ruby C bindings is likely full of conversions to VALUE though |
22:50:03 | reactormonk | Araq, yeah, you gotta ignore them |
22:50:17 | Araq | yeah but then what's the point? |
22:50:19 | reactormonk | how do I create a sha-something hash? |
22:50:26 | reactormonk | Araq, copy the interface etc. |
22:50:43 | Araq | reactormonk: the interface is full of VALUE |
22:50:52 | fowl | OrionPK, i found some zlib stuff in my gists, 1 sec |
22:51:20 | OrionPK | i dont need it, thanks though |
22:51:29 | OrionPK | reactormonk was the one who was trying to get it working |
22:51:37 | reactormonk | which I did |
22:51:38 | OrionPK | i have zlib working in familiar |
22:52:11 | fowl | https://gist.github.com/fowlmouth/3503440 |
22:52:16 | reactormonk | any sha1/sha256 something available? |
22:52:46 | OrionPK | sha1 is on babel |
22:52:54 | OrionPK | not sha256 |
22:55:21 | reactormonk | cute |
22:55:32 | reactormonk | now how do I make http PUT requests |
22:56:31 | reactormonk | jester for the server-side |
22:56:34 | reactormonk | any curl bindings? |
22:56:41 | * | noam joined #nimrod |
22:56:47 | OrionPK | yes |
22:56:49 | Araq | result = "" |
22:56:50 | Araq | result.setLen destLen |
22:56:52 | Araq | --> |
22:56:59 | Araq | result = newString(destLen) |
22:57:02 | reactormonk | OrionPK, not on babel |
22:57:02 | OrionPK | http://nimrod-lang.org/lib.html#network-programming-and-internet-protocols |
22:57:17 | OrionPK | http://nimrod-lang.org/libcurl.html |
22:57:52 | OrionPK | https://github.com/trevorlinton/webkit.js |
22:59:05 | reactormonk | dafuq |
23:00:25 | discoloda | has someone made a nimrod.js? |
23:00:51 | OrionPK | i think discolada was going to |
23:01:05 | Araq | discoloda: what's a nimrod.js? |
23:01:16 | OrionPK | nimrod -> emscripten -> nimrod.js :P |
23:02:39 | Araq | nimrod js myfile.nim ? |
23:03:05 | Araq | but sure go ahead, emscripten is actually a different target |
23:03:46 | OrionPK | discoloda you have permission now |
23:05:51 | Araq | hey, I rarely tell people what to do |
23:06:08 | OrionPK | so what about select() |
23:06:35 | Araq | I told dom96 what to do |
23:07:03 | Araq | not sure if he's still against it or simply away |
23:07:14 | OrionPK | what'd you tell him to do |
23:07:19 | OrionPK | the jist |
23:07:38 | Araq | to fix it with your help for good and document it well |
23:07:54 | OrionPK | oh, was i there for that? because i feel like i was |
23:08:05 | OrionPK | & dom96 didnt want to fix it like that |
23:08:11 | Araq | I feel like you were, yes |
23:08:30 | OrionPK | seemed like he was anti, and things were kind of left unresovled |
23:08:53 | Araq | but afterwards I called him names in PM and now he shall obey |
23:09:04 | OrionPK | ahh, perfect |
23:09:26 | OrionPK | so we adding a new 'selectors' module and removing 'select' from sockets? |
23:09:57 | Araq | no, just fix select in sockets |
23:10:04 | * | Demos quit (Quit: Textual IRC Client: www.textualapp.com) |
23:10:05 | OrionPK | oh |
23:10:07 | Araq | selectors still has a long way to go |
23:10:12 | OrionPK | yeah i figured |
23:10:21 | OrionPK | I already did submit a PR to fix it |
23:10:32 | OrionPK | along w/ fixing a lot of usages of it |
23:10:42 | Araq | oh hm |
23:10:56 | Araq | fixed *every* usage? ;-) |
23:11:05 | OrionPK | that I could find in the araq/nimrod repo, yeah |
23:11:16 | Araq | cool, wasn't aware |
23:11:26 | Araq | I guess I should do even more code reviews ... |
23:11:47 | OrionPK | it was some months back, so it'd need to be reviewed thoroughly |
23:13:39 | OrionPK | https://github.com/Araq/Nimrod/pull/655 |
23:16:27 | * | darkf joined #nimrod |
23:18:22 | reactormonk | Pslist* = ptr Tslist |
23:18:30 | reactormonk | how do I allocate/create that one? |
23:19:17 | reactormonk | in C it's a struct curl_slist *headers = NULL; but I'm not really sure how to express that in nimrod |
23:19:26 | reactormonk | a simple var headers = PSList() doesn't do it |
23:21:58 | EXetoC | it should work if the members are initialized, right? |
23:22:28 | EXetoC | or maybe that's for ref and values only |
23:22:57 | EXetoC | alloc? |
23:22:58 | Araq | yeah, for "ptr" you still need to use alloc or allo0 |
23:23:04 | Araq | *allocß |
23:23:07 | Araq | *alloc0 |
23:23:14 | reactormonk | emdr.nim(61, 22) Error: object constructor needs an object type |
23:23:52 | reactormonk | soooo how do I use alloc0? |
23:24:37 | fowl | reactormonk, are you interfacing? |
23:24:43 | fowl | reactormonk, alloc0(sizeof(T)) |
23:24:47 | reactormonk | fowl, yup |
23:24:49 | reactormonk | kk |
23:24:51 | fowl | cast[ptr T](alloc0(..)) |
23:25:06 | fowl | reactormonk, you can use fowltek/pointer_arithm |
23:25:32 | reactormonk | fowl, via babel? |
23:27:34 | fowl | yea |
23:28:11 | Araq | OrionPK: can you please do that PR against devel? |
23:28:18 | fowl | then you have alloc[T](): ptr T |
23:28:44 | OrionPK | when i get some time araq |
23:28:51 | OrionPK | wont be til tomrrow probably |
23:31:28 | dom96 | Araq: I already gave access to gradha and fowl. |
23:31:48 | Araq | dom96: oh alright never mind then |
23:32:29 | dom96 | Araq: Sure, pull the select() "fix". But all the breakage is on you ;) |
23:32:46 | Araq | dom96: devel branch :P |
23:34:19 | reactormonk | meh, curl segfaults |
23:35:02 | reactormonk | how come I can't use string literals as cstring literals? |
23:35:16 | fowl | you can |
23:35:33 | reactormonk | without the cstring() around? |
23:35:36 | fowl | yes |
23:36:56 | reactormonk | hmmm |
23:37:43 | reactormonk | http://dpaste.com/1555428/ segfaults on perform |
23:39:21 | reactormonk | sometimes I wish for httparty :-/ |
23:42:14 | reactormonk | great, backtrace somewhere into libcurl :-( |
23:43:26 | * | psquid joined #nimrod |
23:49:05 | fowl | reactormonk, isnt there already a curl wrapper |
23:51:06 | reactormonk | fowl, maybe, haven't found it |
23:51:58 | reactormonk | I removed the headers, now curl_perform hangs. |
23:52:06 | dom96 | reactormonk: Why are you using curl? |
23:52:10 | fowl | reactormonk, http://build.nimrod-lang.org/docs/libcurl.html |
23:52:30 | reactormonk | dom96, posting http stuff. Got a better option? |
23:52:36 | dom96 | reactormonk: httpclient? |
23:55:05 | reactormonk | let's see |
23:55:13 | reactormonk | Error: unhandled exception: 400 Bad Request [EHttpRequestErr] |
23:55:45 | reactormonk | I guess that's not that bad |
23:55:47 | reactormonk | dom96, thanks. |
23:56:09 | dom96 | reactormonk: What are you working on? |
23:56:26 | dom96 | httpclient is currently not suited for multiple rapid requests to the same server. |
23:56:30 | reactormonk | dom96, emdr -> couchdb, a small project to gather data for something bigger |
23:56:37 | reactormonk | dom96, meh |
23:56:48 | reactormonk | I can always bulk store stuff |
23:57:45 | reactormonk | dom96, and btw, how should I get the rest for the body from the response when it raises on bad request? |
23:58:46 | dom96 | only the *Content procs raise exceptions on 4xx and 5xx errors. |