00:00:15 | Araq | echo system.nimrodversion iirc |
00:00:28 | filwit | k, good to know |
00:00:35 | Araq | filwit: why does it fail on master too? |
00:00:43 | Araq | master doesn't use the new vm |
00:01:05 | renesac | Araq, I was in the right place |
00:01:16 | filwit | Araq: idk, haven't tried in awhile, maybe that was based on bad work on my end |
00:01:31 | renesac | changing what you suggested now makes "var y:int64 = 2; var x:byte = 5 + y" work.... |
00:01:40 | filwit | Araq: but i remember it crashing after i pulled the latest changes to master and built, but not before |
00:01:48 | renesac | I want the inverse |
00:02:28 | Araq | renesac: I'm tired, I could be wrong |
00:02:55 | BlueProtoman | Hm, I can't link to a particular source file... |
00:03:00 | Araq | also I never get any subtype/type conversion relations right |
00:03:04 | BlueProtoman | *source file on compileonline.com |
00:03:13 | renesac | :/ |
00:03:44 | Araq | in fact I've given up on getting the subtype relation right, I implement it somehow and then test it and then flip a,b |
00:04:05 | Araq | that's much more reliable than thinking about it |
00:04:08 | filwit | BlueProtoman: email code + url to your TA/instructor |
00:04:44 | renesac | BlueProtoman, can't you ask for IDEOne update their version of the compiler? |
00:04:58 | BlueProtoman | renesac: How fast would they comply? |
00:05:06 | renesac | I have no idea |
00:05:11 | filwit | 2.8234 minutes exactly |
00:05:20 | renesac | but it don't hurt to try |
00:05:24 | filwit | ^ |
00:06:00 | Araq | BlueProtoman: why do you need to use some webservice stuff? |
00:06:42 | BlueProtoman | Araq: The TAs will not have Nimrod installed. What I was going to do is have the code on my (paper) submission, and include a short link to a webservice that will run the code with arbitrary input. |
00:08:40 | Araq | BlueProtoman: send them the generated C code then :P |
00:08:56 | Araq | nah, just kidding ... or am I not? |
00:09:13 | BlueProtoman | Araq: Doesn't it depend on what platform you compile for? |
00:09:37 | BlueProtoman | I suppose I could just use 0.8.8...reversing a singly-linked list doesn't need advanced features, right? |
00:10:29 | Araq | right |
00:10:45 | Araq | right |
00:10:52 | Araq | good night, guys |
00:10:55 | renesac | http://dpaste.dzfl.pl/ <-- this thing from D community is cool, and let's you select the compiler version (good to see if your bug is already fixed in devel HEAD w/o needing to compile it) |
00:12:26 | renesac | wish nimrod community could have something like that... |
00:13:30 | Araq | DAddYE wanted to build something like that |
00:13:39 | filwit | Araq: found the bug |
00:13:45 | Araq | and also a web frontend for c2nim |
00:13:59 | Araq | to help people learn nimrod, iirc |
00:14:11 | filwit | Araq: pfft.. spoke too soon, sorry |
00:14:20 | Araq | filwit: I'm sleeping |
00:14:22 | Araq | good night |
00:14:26 | filwit | later |
00:14:34 | Araq | filwit: you can try to simply disable the 'unused' check |
00:14:42 | Araq | and see if it fixes it already |
00:14:53 | Araq | speaking from experience ... it usually does |
00:15:00 | Araq | bye |
00:15:44 | renesac | hum, the main use I found for dpaste was to test on different compilers (LDC, GDC, etc had different bugs than DMD) |
00:16:37 | renesac | and different versions |
00:19:33 | * | BlueProtoman left #nimrod ("Leaving") |
00:20:29 | * | JStoker quit (Excess Flood) |
00:24:13 | * | JStoker joined #nimrod |
00:32:30 | * | icebattle quit (Read error: Connection reset by peer) |
00:44:55 | Varriount | dom96: Does babel support multiple versions of a single package? |
00:46:04 | Varriount | I can see a neew where you might be working on some programs that need one version of "Foo", and some programs needing another version of "Foo" |
01:00:34 | reactormonk_ | renesac, how exactly do you imagine the semantics for varargs[openarray[int]] ? |
01:01:47 | * | JStoker quit (Excess Flood) |
01:02:26 | * | reactormonk_ is now known as reactormonk |
01:03:57 | * | brihat quit (Read error: Connection reset by peer) |
01:04:08 | Varriount | reactormonk, renesac: Or even how such a thing would work. |
01:04:22 | * | DAddYE quit (Remote host closed the connection) |
01:05:19 | * | JStoker joined #nimrod |
01:07:37 | * | JStoker quit (Excess Flood) |
01:08:48 | * | JStoker joined #nimrod |
01:13:17 | EXetoC | [1, 2, 3], [4, 5, 6]? |
01:16:49 | EXetoC | nvm |
01:30:12 | * | xenagi quit (Quit: Leaving) |
02:03:47 | * | XAMPP joined #nimrod |
02:03:47 | * | XAMPP quit (Changing host) |
02:03:47 | * | XAMPP joined #nimrod |
02:05:22 | * | DAddYE joined #nimrod |
02:06:35 | renesac | reactormonk, Varriount: an seq with pointers to other seqs/arrays? |
02:06:36 | renesac | :P |
02:07:16 | renesac | is there any way to parametrize the size of an array? |
02:08:04 | renesac | like 'proc foo[N](varargs[array[N, int]]): array[N, int]' |
02:08:04 | renesac | ? |
02:09:49 | * | DAddYE quit (Ping timeout: 265 seconds) |
02:11:58 | EXetoC | yes |
02:24:30 | * | aruniiird quit (Quit: Leaving) |
02:47:27 | * | dope joined #nimrod |
02:47:33 | * | dope left #nimrod (#nimrod) |
02:55:14 | * | Puff quit (Disconnected by services) |
02:55:44 | * | BitPuffi1 joined #nimrod |
03:42:11 | * | Demos joined #nimrod |
04:02:13 | * | BitPuffi1 quit (Ping timeout: 248 seconds) |
04:15:40 | Demos | is there any problem with having the compiler output a "no generic parameters allowed for X" when you go X[type] for something that is not generic. The only code change is replaceing an internalAssert with an error. I think the assert is wrong but I am not sure. Is it an error for a malformed generic instantiation like that to get all the way to the check if the instantiated generic code is correct? |
04:20:25 | * | DAddYE joined #nimrod |
04:57:34 | * | DAddYE quit (Remote host closed the connection) |
05:23:45 | * | FireBeyond joined #nimrod |
05:24:27 | * | FireBeyond left #nimrod ("Textual IRC Client: www.textualapp.com") |
05:30:18 | * | xtagon quit (Quit: Leaving) |
05:49:15 | * | DAddYE joined #nimrod |
06:06:39 | * | brson quit (Ping timeout: 265 seconds) |
06:32:34 | * | DAddYE quit (Remote host closed the connection) |
06:33:05 | * | DAddYE joined #nimrod |
06:33:46 | * | bstrie_ joined #nimrod |
06:37:09 | * | DAddYE_ joined #nimrod |
06:37:35 | * | DAddYE quit (Ping timeout: 265 seconds) |
06:38:45 | * | filwit quit (*.net *.split) |
06:38:46 | * | bstrie quit (*.net *.split) |
06:38:46 | * | musicalchair quit (*.net *.split) |
06:38:48 | * | psquid quit (*.net *.split) |
06:40:15 | * | fowl quit (Read error: Operation timed out) |
06:42:05 | * | shodan45 quit (Remote host closed the connection) |
06:43:07 | * | shodan45 joined #nimrod |
06:44:36 | * | shodan45 quit (Remote host closed the connection) |
06:45:54 | * | filwit joined #nimrod |
06:50:15 | * | musicalchair joined #nimrod |
06:59:55 | * | fowl joined #nimrod |
07:31:53 | * | DAddYE_ quit (Remote host closed the connection) |
07:32:19 | * | DAddYE joined #nimrod |
07:37:17 | * | DAddYE quit (Ping timeout: 272 seconds) |
07:44:18 | * | DAddYE joined #nimrod |
07:51:43 | * | Demos quit (Read error: Connection reset by peer) |
07:56:13 | * | delian1 joined #nimrod |
07:56:21 | * | delian1 quit (Client Quit) |
08:00:42 | * | filwit quit (Ping timeout: 252 seconds) |
08:01:46 | * | psquid joined #nimrod |
08:06:05 | * | zahary joined #nimrod |
08:43:43 | * | krusipo joined #nimrod |
09:17:15 | NimBot | Araq/Nimrod devel ebfbc39 Charlie Barto [+0 ±1 -0]: added good error for stuff like string[int] or int[int] |
09:17:15 | NimBot | Araq/Nimrod devel bd91447 Charlie Barto [+0 ±1 -0]: deleted assert that would never fire because it turned into an error message |
09:17:15 | NimBot | Araq/Nimrod devel e9c0367 zah [+0 ±1 -0]: Merge pull request #870 from barcharcraz/templaterr... 2 more lines |
09:29:30 | * | Mat3 joined #nimrod |
09:29:33 | Mat3 | hi all |
10:16:01 | * | DAddYE quit (Remote host closed the connection) |
10:16:36 | * | DAddYE joined #nimrod |
10:21:19 | * | DAddYE quit (Ping timeout: 272 seconds) |
10:23:31 | * | wan_ quit (Quit: leaving) |
10:35:02 | * | Mat3 quit (Quit: Verlassend) |
11:16:57 | * | DAddYE joined #nimrod |
11:19:51 | * | BitPuffin quit (Ping timeout: 265 seconds) |
11:21:48 | * | DAddYE quit (Ping timeout: 265 seconds) |
11:21:51 | * | zahary quit (Quit: Leaving.) |
11:39:51 | * | zahary joined #nimrod |
11:42:29 | * | DAddYE joined #nimrod |
11:46:51 | * | DAddYE quit (Ping timeout: 250 seconds) |
12:02:38 | * | BitPuffin joined #nimrod |
12:43:16 | * | DAddYE joined #nimrod |
12:47:50 | * | DAddYE quit (Ping timeout: 265 seconds) |
13:11:06 | * | zahary quit (Quit: Leaving.) |
13:11:56 | * | ddl_smurf joined #nimrod |
13:41:19 | * | [1]Endy joined #nimrod |
13:44:13 | * | DAddYE joined #nimrod |
13:48:37 | * | DAddYE quit (Ping timeout: 250 seconds) |
14:03:24 | * | darkf quit (Quit: Leaving) |
14:05:05 | * | BitPuffin quit (Ping timeout: 250 seconds) |
14:08:53 | * | BitPuffin joined #nimrod |
14:44:48 | * | DAddYE joined #nimrod |
14:49:38 | * | DAddYE quit (Ping timeout: 265 seconds) |
14:54:47 | * | [2]Endy joined #nimrod |
14:54:55 | * | BitPuffin quit (Ping timeout: 250 seconds) |
14:58:05 | * | [1]Endy quit (Ping timeout: 272 seconds) |
15:13:06 | * | io2 joined #nimrod |
15:16:33 | * | io2 quit (Client Quit) |
15:19:27 | * | io2 joined #nimrod |
15:23:40 | * | BitPuffin joined #nimrod |
15:42:25 | * | BitPuffin quit (Ping timeout: 272 seconds) |
15:45:28 | * | DAddYE joined #nimrod |
15:48:20 | * | zahary joined #nimrod |
15:50:03 | * | DAddYE quit (Ping timeout: 265 seconds) |
16:04:30 | * | BitPuffin joined #nimrod |
16:23:48 | * | shodan45 joined #nimrod |
16:46:14 | * | filwit joined #nimrod |
16:46:22 | * | DAddYE joined #nimrod |
16:50:57 | * | DAddYE quit (Ping timeout: 265 seconds) |
17:20:32 | EXetoC | there's no support for non-standard unescaped xml/html ampersands, right? I'm trying to fix that |
17:21:07 | EXetoC | specifically in attribute values |
17:45:47 | * | mietek_ joined #nimrod |
17:46:16 | * | mietek quit (Read error: Operation timed out) |
17:46:42 | * | Discolod1 quit (Read error: Operation timed out) |
17:46:49 | * | Discoloda joined #nimrod |
17:47:03 | * | DAddYE joined #nimrod |
17:47:09 | * | Trixar_za quit (Ping timeout: 252 seconds) |
17:47:47 | * | Trixar_za joined #nimrod |
17:48:46 | Araq | EXetoC: no idea what you're talking about |
17:49:50 | * | BitPuffin quit (Ping timeout: 240 seconds) |
17:50:30 | EXetoC | Araq: href="x=1&y=2" |
17:50:37 | EXetoC | I don't know how common that is |
17:50:47 | Araq | very |
17:51:17 | * | DAddYE quit (Ping timeout: 250 seconds) |
17:51:21 | EXetoC | you mean they're rarely escaped in values? & |
17:52:17 | Araq | yes |
17:52:57 | EXetoC | so much for standards |
17:53:17 | Araq | it was completely forseeable |
17:54:29 | Araq | you got urls, html, http, email addresses, all with its own escaping rules |
17:55:08 | Araq | in a nice "layered approach" package |
17:55:46 | * | DAddYE joined #nimrod |
17:56:17 | Araq | and then they wonder everybody gets it wrong ... |
17:57:20 | EXetoC | that makes sense. string literals contains arbitrary data, so it shouldn't be so complicated |
17:57:48 | Araq | you might as well wonder why the oceans are full of pastic, given that it doesn't rot ... |
17:58:13 | EXetoC | c(:)-< |
17:59:35 | * | brihat joined #nimrod |
17:59:57 | * | DAddYE quit (Ping timeout: 250 seconds) |
18:02:14 | * | brson joined #nimrod |
18:07:32 | filwit | Araq: i removed the 'unused' check from vmgen:1319 like you suggested, and now it's assert-failing at vm:425, and there's a comment "XXX: this is not correct" by the line. |
18:07:54 | filwit | Araq: i tried a couple different things, with no luck. Wondering if you have any ideas. |
18:07:57 | * | Mat3 joined #nimrod |
18:07:59 | Mat3 | hi all |
18:08:02 | filwit | hey |
18:08:07 | Mat3 | hi filwit |
18:08:12 | filwit | :) |
18:08:49 | filwit | Araq: i'm sure you're probably busy, but if you get a minute to look at the problem I would appreciate any feedback. |
18:09:35 | filwit | Araq: I'll be trying different things myself for awhile and I'll let you know if I've made any progress |
18:18:25 | Araq | filwit: actually removing the 'unused' check in line 1319 doesn't cut it |
18:18:41 | Araq | you need to free the register as a workaround |
18:19:50 | Araq | nah, forget that |
18:19:52 | Araq | it doesn't matter |
18:19:58 | filwit | Araq: what's wrong with the register though? That's what I don't understand. I change the assert at vm:425 to a tell me what the register kind was, and it's a nkMetaNode |
18:22:09 | filwit | something is generating the stmt list wrong or the stack-frame, but I'm still hunting to find what exactly that is. If i completely remove the assert at vm:425, it works but hits a different assert later (goes through vm:850 to assert fail on vm:82) |
18:23:48 | filwit | one thing I was going to try is removing the 'var Type' param from my functions to see if that helps |
18:24:13 | * | BitPuffin joined #nimrod |
18:24:23 | filwit | since it's failing at the dereference nkRefType assert |
18:25:01 | Araq | that sounds about right |
18:25:13 | Araq | 'var Type' could cause the problems |
18:26:10 | filwit | Okay, I'll try that, though that's not a good solution for me (really will be unoptimized if I can't use var params). Quick question fisrt, nkMetaNode means what kind of Nimrod syntax? |
18:27:37 | Araq | nkMetaNode is a PNimrodNode |
18:27:58 | filwit | okay, i see |
18:28:11 | * | DAddYE joined #nimrod |
18:28:14 | Araq | cool cause I don't :P |
18:28:26 | Araq | the invariants make me crazy |
18:29:18 | filwit | well i'm passing around "node:var PNimrodNode" as my first param of the problem proc |
18:30:01 | Araq | it's amazing how good the old vm worked ... |
18:30:35 | filwit | why did you change? |
18:30:52 | filwit | performance? |
18:30:56 | Araq | yes |
18:31:13 | Araq | also it has its own nasty bugs |
18:36:08 | filwit | i didn't realize this before, but my code is failing at [parseutils] |
18:36:19 | filwit | interesting.. |
18:36:45 | filwit | that makes more sense why it's always the first line after 'else' statements that's failing then |
18:38:41 | * | zahary quit (Quit: Leaving.) |
18:44:49 | * | shodan45 quit (Quit: Konversation terminated!) |
18:46:12 | filwit | Araq: dope, fixed it. though i'm not quite sure exactly why yet |
18:47:44 | filwit | Araq: i removed the assert at vm:425, and changed the assert at vm:82 to "assert n.kind in { nkMetaNode, nkStmtList }" and now my program works. |
18:48:28 | filwit | hmm... i see what's going on i think |
18:49:05 | filwit | i think my macro code was wrong and trying to add a proc node too a type stmt list |
18:50:00 | reactormonk | renesac, so you want your varargs to be of type seq[seq[T]] ? |
18:50:43 | filwit | well, no, the compiler is working cause now it's giving the "illformed AST" error, so at least it's giving errors |
18:50:51 | reactormonk | renesac, I'd just overload it with varargs: seq[seq[T]] and varargs seq[T] |
18:52:54 | * | shodan45 joined #nimrod |
18:54:51 | filwit | bbl |
19:01:26 | * | io2 quit (Ping timeout: 264 seconds) |
19:31:52 | reactormonk | http://genericlanguage.wordpress.com/2014/02/04/advice-on-writing-a-programming-language/ cute |
19:37:03 | * | xtagon joined #nimrod |
19:50:31 | * | zahary joined #nimrod |
19:53:23 | EXetoC | <a id="id" href="/bla?x=1&y=2" class="class">title</a> |
19:53:57 | EXetoC | Araq: I've managed to keep the ampersand, but it causes innerText to evaluate to: class="class">title |
19:54:03 | EXetoC | any idea where to go from there? |
20:08:29 | Araq | EXetoC: nope, sorry |
20:09:27 | EXetoC | I'm lost. will report it instead |
20:13:28 | EXetoC | it might be utf thing |
20:15:50 | EXetoC | chars like å gets their own xnText nodes |
20:19:45 | Araq | dom96: how can the tester get a list of all babel packages? |
20:20:39 | dom96 | Read this https://github.com/nimrod-code/packages/blob/master/packages.json |
20:21:33 | Araq | and then? should I download it every time? |
20:21:52 | Araq | I think babel needs a 'list' option |
20:22:17 | dom96 | If you want to depend on babel then you may as well read ~/.babel/packages.json |
20:22:27 | dom96 | Babel has a list option. |
20:22:56 | dom96 | Easier to parse the JSON than the output of 'babel list' though |
20:23:40 | Araq | true |
20:23:52 | Araq | how can I find the .babel directory? |
20:24:24 | dom96 | It's always in ~ |
20:24:41 | Araq | os.getHomeDir()? |
20:24:47 | dom96 | yes |
20:25:00 | dom96 | That will become configurable though |
20:26:07 | * | mietek_ is now known as mietek |
20:26:16 | dom96 | You could make the tester depend on ``babelpkg`` |
20:26:32 | dom96 | There is a getPackageList function in packageinfo.nim |
20:41:14 | * | Demos joined #nimrod |
20:42:13 | reactormonk | no dependencies? |
20:42:50 | Araq | dom96: how will it become configurable? |
20:44:40 | Araq | ping DAddYE |
20:46:13 | dom96 | Araq: Not sure yet. |
20:48:52 | Araq | zahary: fyi tests/misc/tgenconstraints.nim now fails |
20:51:59 | * | [2]Endy quit (Ping timeout: 250 seconds) |
20:59:49 | DAddYE | Araq: bbs in 5 |
21:01:49 | * | Mat3 http://ootbcomp.com/docs/encoding/ |
21:12:40 | Araq | Mat3: excellent link |
21:21:38 | DAddYE | Araq: here I'm |
21:25:26 | Araq | DAddYE: now where is the c2nim web service? :-) |
21:25:44 | DAddYE | Araq: monday will be ready |
21:26:05 | Araq | it's tuesday already here in europe ... |
21:26:08 | DAddYE | this weekend I had to see some new houses (eol for my rent) |
21:26:16 | DAddYE | *next monday |
21:26:31 | Araq | lol alright |
21:29:32 | * | zahary quit (Quit: Leaving.) |
21:34:22 | renesac | it would be nice If I could just " importc: "xlib.h" " at the top of my program and have a low level wrapper constructed for me |
21:35:57 | renesac | but I guess that c2nim needs some manual preprocessing on the .h file to be able to correctly handle it |
21:36:07 | EXetoC | not the previous monday? oh well. better late than never I guess |
21:36:17 | renesac | in "normal' (complex) cases |
21:36:57 | renesac | I haven't tried c2nim yet, though I will soon |
21:37:33 | renesac | but that was the impression I got reading the docs, and from other languages with similar FFI |
21:38:43 | Araq | importc: "xlib.h" is a pipe dream |
21:39:13 | Araq | the only language that can do that are supersets of C or C itself |
21:39:13 | Araq | and for good reasons |
21:39:13 | renesac | reactormonk, I was actually thinking about something that can work on both arrays and seqs |
21:39:58 | EXetoC | type parameters? |
21:40:33 | renesac | well, I read that openarray[] is the thing for it |
21:41:13 | Araq | renesac: you can't nest openarrays for technical reasons |
21:42:03 | renesac | hum, it isn't clear what are those techical reasons |
21:42:13 | renesac | is it because some arrays may be on the stack? |
21:42:43 | Araq | array [4, array [3, int]] is packed in memory, seq[seq[int]] is not |
21:43:03 | Araq | so how can openarray[openarray[int]] take both? |
21:43:23 | Araq | that requires some pointer mungling defeating the purpose |
21:43:23 | renesac | right, but what I wanted was "vararg[openarray[T]]" |
21:43:38 | Araq | varargs is the same as openarray |
21:43:38 | renesac | but vararg seems to be implemented as openarray |
21:43:38 | renesac | right.. |
21:44:18 | Araq | you can instead use a generic |
21:44:38 | renesac | well, I don't see why vararg must be an packed array in case of arrays |
21:45:18 | renesac | it must behave like an openarray, or it is just an implementation choice? |
21:45:58 | Araq | I'm not sure what the choice here is |
21:46:08 | Araq | what's the alternative you have in mind? |
21:48:33 | renesac | seq[array[3,int]]? |
21:53:33 | Araq | makes no sense |
21:54:58 | Mat3 | I think that means sequence of fixed integer array-elements with dimension 3 |
21:55:18 | Araq | Mat3: yes that is what it means |
21:55:18 | EXetoC | you'd lose the syntactic sugar, that's all |
21:55:28 | EXetoC | sort of |
21:55:28 | Araq | but you can't pass an array to a seq |
21:55:43 | Araq | so there is no openarray like functionality left |
21:56:38 | renesac | hum |
21:56:53 | renesac | well, I learned that I can do "proc arr[N](a: array[N, int]): array[N, int] =" |
21:57:03 | renesac | this is already pretty helpful |
21:58:43 | Mat3 | is this an example of Fortran code you want to convert ? |
21:59:43 | renesac | no use for this yet, I just hit this limitation trying to write a too generic function for that ParticleBench code |
22:00:43 | * | BitPuffi1 joined #nimrod |
22:01:03 | Mat3 | hi BitPuffin |
22:02:43 | * | BitPuffin quit (Ping timeout: 250 seconds) |
22:03:13 | Mat3 | Araq: Do you think sequences of arrays are useful ? |
22:03:23 | * | apotheon joined #nimrod |
22:03:23 | * | apotheon quit (Changing host) |
22:03:23 | * | apotheon joined #nimrod |
22:03:43 | Araq | sure |
22:03:58 | Mat3 | I see some application for GPU programming |
22:04:43 | Mat3 | get some sleep, ciao |
22:04:43 | Araq | bye |
22:05:03 | * | Mat3 quit (Quit: Verlassend) |
22:07:43 | * | brihat quit (Ping timeout: 245 seconds) |
22:08:53 | renesac | Araq, the problem I hit yesterday could be solved if there is someway to tell that uint64, for example, is preferable over Int if uint8 is conversible to both and both are acceptable |
22:08:53 | Demos | I am having some trouble with winlean failing to compiler |
22:09:23 | Demos | rather OS is failing to compiler but it says it is missing the definition of FILE_ATTRIBUTE_REPARSE_POINT, which I clearly see in winlean |
22:16:03 | Araq | maybe you use -d:useWinAnsi ? |
22:16:13 | Demos | I did not do that |
22:17:20 | Demos | and on os.nim line 1248 it can not find FILE_ATTRIBUTE_REPARSE_POINT but it can find FILE_ATTRIBUTE_DIRECTORY, which is declared right above REPARSE_POINT |
22:17:46 | Araq | well I constantly bootstrap on windows |
22:17:58 | Araq | and this uses winlean |
22:18:28 | Demos | hm createSymbolicLinkW and createSymbolicLinkA are also not found (depending on useWinAnsi ofc |
22:18:36 | Demos | yeah I just bootstrapped the compiler just fine |
22:43:40 | dom96 | Varriount: Sorry, forgot to answer you. Yes, babel supports multiple versions of the same package. However, a single package may not depend on two different versions of some package. |
22:44:16 | * | brson quit (Quit: leaving) |
22:44:29 | * | brson joined #nimrod |
22:45:19 | Demos | what is the exact name of the sanespaces pragma |
22:47:22 | Araq | 'strongSpaces' |
22:47:28 | Araq | but it is not implemented yet |
22:47:38 | Demos | nuts |
22:48:25 | Araq | hey, most people loved the name when I came up with it ... |
22:49:04 | Demos | what? I like sanespaces. much nicer than having to deal with so many parens, and easy to change later |
22:49:53 | Araq | I'm talking about the *name*, not the *feature* |
22:50:02 | Araq | you just said the name is nuts |
22:50:05 | Araq | and I wonder why |
22:53:41 | Varriount | Hi guys |
22:54:17 | Demos | oh I was saying nuts like "nuts I wish that was implemented" |
22:54:23 | Varriount | Demos: Something off about winlean? |
22:54:29 | Demos | yeah little bit |
23:07:27 | * | apotheon left #nimrod (#nimrod) |
23:11:33 | renesac | a template must return a "stmt"? |
23:11:44 | renesac | I'm trying to return a float, like a function, but it won't let me |
23:12:28 | renesac | *like a procedure |
23:15:24 | renesac | also, looks like no implicit "result" variable is declared for templates |
23:16:28 | Varriount | renesac: Templates are akin to C/C++ defines |
23:17:07 | Varriount | The entire body of the macro is inserted into it's calling context |
23:17:34 | renesac | hum |
23:18:07 | renesac | so it can only return "expr" or "stmt" |
23:18:11 | renesac | ? |
23:18:32 | Varriount | Yes, which is the body of the template |
23:19:23 | renesac | ok, so they are not the right tool to implement a "timeit" like call |
23:19:55 | renesac | like "echo timeit: \n stmts" |
23:20:33 | Varriount | renesac: Why not? |
23:20:33 | renesac | to print the time to execute the following stmts |
23:20:45 | renesac | well, i couldn't make it work |
23:20:50 | Varriount | Code? |
23:21:00 | renesac | I will try to return a expr then |
23:22:59 | renesac | https://gist.github.com/ReneSac/715730359e06c472f683 |
23:23:15 | renesac | wait a minute |
23:23:23 | renesac | I will edit it with the call and result |
23:23:25 | Varriount | Why are you using a stmt? |
23:23:59 | Varriount | Why not allow an expr? That way you can time bodies of code. |
23:24:18 | renesac | updated |
23:24:41 | renesac | expr is more general than stmt? |
23:24:47 | Varriount | Yes |
23:24:55 | Varriount | iirc |
23:25:07 | renesac | well, the result is the same |
23:25:17 | renesac | maybe I should't use "return"? |
23:25:39 | Varriount | renesac: What is a "stopWatch"? |
23:26:02 | renesac | a object I defined: https://github.com/ReneSac/Benchmark |
23:28:04 | Araq | renesac: returning a float from a template is fine |
23:28:31 | Araq | but 'return' cannot be used for obvious reasons |
23:28:58 | Araq | and it doesn't have 'result' either, how could it? :P |
23:29:51 | Varriount | renesac: You could use the template to generate a proc though |
23:30:59 | renesac | so, how I return a float? |
23:31:38 | Varriount | Possibly through a statement list? |
23:31:53 | EXetoC | 1.0? |
23:31:57 | renesac | is there any example out there? |
23:32:17 | renesac | I could't find anything on the manual or tutorial |
23:33:12 | EXetoC | template x: expr = echo 1; 2; echo x |
23:33:40 | Varriount | renesac: What happens if you remove the return, and just leave a dangling "sw.peek"? |
23:34:06 | renesac | the same error, it seems |
23:34:54 | Varriount | renesac: If you were willing to give up the procedure call syntax style, there's another way |
23:34:55 | EXetoC | it might have something to do with that block |
23:35:25 | EXetoC | used as an expr rather than a stmt |
23:35:49 | renesac | I changed the header to "template timeit*(code: stmt): float = " and it still gives the same error |
23:37:16 | renesac | Varriount, what way would be that? Inserting a variable? |
23:37:23 | Varriount | renesac: Yep |
23:37:24 | renesac | that is unhigienic... |
23:37:42 | Varriount | Not if it's an argument |
23:38:04 | renesac | hum |
23:38:11 | * | darkf joined #nimrod |
23:38:20 | Varriount | renesac: Or you could use a closure |
23:38:24 | renesac | so, like "timeit(res): code" ? |
23:38:39 | Varriount | renesac: Something like that |
23:38:40 | EXetoC | Varriount: arg + immediate? |
23:39:00 | Varriount | I've no idea. |
23:39:25 | Araq | renesac: it works like this: |
23:39:34 | Araq | template timeit*(code: stmt): float = |
23:39:35 | Araq | var sw = 4.0 |
23:39:37 | Araq | code |
23:39:38 | Araq | sw - 2.0 |
23:39:40 | Araq | var x = timeit do: |
23:39:41 | Araq | echo "bazz" |
23:39:43 | Araq | echo x |
23:40:08 | Varriount | I just spent 3 hours on a calc test. My brain is as deflated as a blow-out tire |
23:40:15 | renesac | I would rather not use a closure, because if I need to do: "for i in 0 .. 9999: code" it will make 9999 function calls, wont't it? |
23:40:36 | Araq | it doesn't produce a closure |
23:41:03 | renesac | oh, I need "do" to call a template? |
23:41:29 | Araq | there is some rather badly documented block<->closure abstraction involving 'do' |
23:42:05 | Araq | well the ':' sometimes is too ambiguous and so you have to use 'do:' instead |
23:42:17 | Araq | timeit: |
23:42:21 | Araq | echo "foo" |
23:42:56 | Araq | is it when 'timeit' returns a 'stmt' and is as such a statement itself |
23:44:18 | renesac | oh, it worked |
23:44:28 | renesac | so, it was only the missing "do" |
23:44:49 | Araq | in fact, I would make 'timeit' output it already and make it a stmt template |
23:45:23 | Araq | when you use it as an expression, you have to use 'do:' instead to pass a block of code |
23:45:48 | renesac | output how? "timeit(output): " way? |
23:45:50 | Araq | PRs for the docs welcome *wink* |
23:46:01 | Araq | no, simply echo the time |
23:46:21 | * | brihat joined #nimrod |
23:46:29 | Araq | I need to sleep now, good night |
23:46:38 | renesac | I wanted to give the flexibility of what to do to the caller |
23:47:02 | renesac | just adding a echo (and now a 'do' too) if he wants to immediately printing |
23:47:07 | renesac | good night |
23:57:51 | * | filwit quit (Quit: Leaving) |