00:03:42 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
00:14:42 | * | carum joined #nimrod |
00:28:39 | dom96 | good night |
00:33:11 | xenagi | night |
00:53:44 | * | Icefoz_ joined #nimrod |
00:56:14 | * | Icefoz quit (Ping timeout: 265 seconds) |
00:56:15 | * | Zuchto quit (Ping timeout: 240 seconds) |
00:56:55 | * | Zuchto joined #nimrod |
01:14:24 | * | OrionPK quit (Remote host closed the connection) |
01:17:14 | * | OrionPK joined #nimrod |
01:27:50 | * | Araq quit (Ping timeout: 264 seconds) |
01:28:26 | * | Amrykid quit (Ping timeout: 264 seconds) |
01:30:00 | * | Araq_bnc joined #nimrod |
01:30:14 | * | dom96 quit (Ping timeout: 264 seconds) |
01:34:31 | * | Amrykid joined #nimrod |
01:36:30 | * | dom96 joined #nimrod |
01:42:07 | * | CarpNet quit (Ping timeout: 250 seconds) |
01:42:33 | * | CarpNet joined #nimrod |
01:42:47 | * | DAddYE quit (Remote host closed the connection) |
01:54:26 | * | carum quit (Remote host closed the connection) |
02:06:58 | * | carum joined #nimrod |
02:07:44 | * | Vix joined #nimrod |
02:25:12 | * | brson quit (Quit: leaving) |
02:25:38 | * | brson joined #nimrod |
02:27:16 | * | brson_ joined #nimrod |
02:28:38 | * | Vix quit (Quit: Page closed) |
02:30:54 | * | brson quit (Ping timeout: 245 seconds) |
02:45:54 | * | brson_ quit (Ping timeout: 245 seconds) |
03:01:42 | * | Ycros quit (Quit: No Ping reply in 180 seconds.) |
03:02:00 | * | Ycros joined #nimrod |
03:05:32 | * | DAddYE joined #nimrod |
03:31:58 | Varriount | Araq_bnc: Could you use the fiber api on windows, and the get/set context api on linux, to implement coroutines? |
03:36:55 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:38:13 | * | ics joined #nimrod |
03:40:19 | * | aftersha_ joined #nimrod |
03:44:02 | skrylar | i think you're meant to do coroutines with iterators |
03:48:14 | * | carum quit (Remote host closed the connection) |
03:54:11 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
03:57:31 | * | carum joined #nimrod |
03:59:40 | * | carum quit (Read error: Connection reset by peer) |
04:00:01 | * | carum joined #nimrod |
04:11:00 | Demos | C programmers use sjlj, and fibres seems kinda like that |
04:15:29 | * | psquid quit (Quit: WeeChat 0.4.2) |
04:18:55 | * | DAddYE quit (Remote host closed the connection) |
04:23:02 | * | carum quit (Remote host closed the connection) |
04:23:10 | * | carum joined #nimrod |
04:27:23 | skrylar | lol |
04:27:30 | skrylar | I fixed a bug, just not the one I wanted to fix. xD |
04:27:38 | xenagi | lol |
04:33:08 | * | xenagi quit (Quit: Leaving) |
04:33:58 | skrylar | fml |
04:34:10 | skrylar | I seem to have more bugs in my testing harness than I ever do the main code |
04:45:57 | * | BitPuffin quit (Ping timeout: 248 seconds) |
05:11:29 | Demos | lol :D I wrote my first ray tracer yesterday. I got the intersection check and lighting calculations right the first try and screwed up lerping between the screen edges |
05:19:06 | * | carum quit (Remote host closed the connection) |
05:22:45 | * | carum joined #nimrod |
05:26:57 | * | carum quit (Remote host closed the connection) |
05:49:45 | * | xtagon quit (Quit: Leaving) |
05:49:49 | skrylar | its probably a colossal waste of time, but i still kinda want a Fountain parser |
05:50:15 | skrylar | so it converts a movie script in to lua |
06:10:24 | * | Demos quit (Read error: Connection reset by peer) |
06:19:46 | * | dmac joined #nimrod |
06:20:40 | * | DAddYE joined #nimrod |
06:23:57 | skrylar | hrm |
06:24:18 | skrylar | i've noticed that some of the stdlib operations are missing for uints |
06:24:33 | filwit | import unsigned |
06:25:08 | * | skrylar ponders why that isn't done by default |
06:25:19 | * | DAddYE quit (Ping timeout: 260 seconds) |
06:25:21 | skrylar | also, no. importing unsigned doesn't fix inc() |
06:25:25 | * | filwit wonders the same thing |
06:25:43 | filwit | not sure about inc for uint, never tried |
06:25:49 | skrylar | it just errors |
06:25:53 | filwit | i don't use inc, i just += 1 |
06:26:19 | skrylar | i should probably poke in to the compiler at some point, those issues are minor enough i can probably fix them |
06:26:38 | filwit | yeah it's probably just a missing proc in the unused lib |
06:28:25 | * | demizer left #nimrod ("WeeChat 0.4.2") |
06:28:41 | * | DAddYE joined #nimrod |
06:48:34 | * | filwit quit (Quit: Leaving) |
07:05:19 | * | Araq_bnc is now known as Araq |
07:09:13 | Araq | Varriount: yes you can use setcontext et al that |
09:45:55 | * | DAddYE quit (Remote host closed the connection) |
10:21:29 | * | BitPuffin joined #nimrod |
10:54:33 | BitPuffin | how do I set a socket to be non blocking with the sockets module |
10:55:27 | BitPuffin | like fcntl(socket, F_SETF, O_NONBLOCK, 1); |
10:59:46 | BitPuffin | oh |
10:59:52 | BitPuffin | is it setting buffered to false? |
11:00:49 | skrylar | o_o |
11:00:54 | skrylar | that code looks disgusting |
11:01:02 | skrylar | why is it not more nimrod-y :) |
11:01:42 | BitPuffin | skrylar: that's C code |
11:01:52 | BitPuffin | skrylar: I'm wondering what the nimrod equivalent is |
11:02:02 | BitPuffin | I assume it is setting up the socket something like this: |
11:03:47 | BitPuffin | var sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, false) |
11:04:10 | BitPuffin | then you'll hopefully have an async socket that uses udp |
11:09:40 | * | dom96_and joined #nimrod |
11:09:47 | dom96_and | BitPuffin: no |
11:10:14 | dom96_and | Use PAsyncSocket or sockets.setBlocking |
11:10:47 | skrylar | hmm.. I haven't touched any of the IO modules sadly |
11:11:21 | skrylar | I remember rust sockets were embarassing. Couldn't send/recv because they decided you don't need nonblock, you should just use tasklets. Which basically means two OS threads per socket. |
11:11:35 | skrylar | Yay using the *actual* nonblock command |
11:13:24 | BitPuffin | dom96_and: which one is preferred? |
11:13:29 | BitPuffin | I guess PAsyncSocket? |
11:13:47 | dom96_and | Yes. |
11:14:04 | BitPuffin | dom96_and: lol I like how I start using it while you are messing with it |
11:14:06 | dom96_and | Use it with the dispatcher |
11:14:10 | BitPuffin | dom96_and: you better get done ;) |
11:14:19 | BitPuffin | dispatcher? |
11:14:38 | dom96_and | GSoC takes priority |
11:17:08 | BitPuffin | dom96_and: uh, GSoC is quite a bit away |
11:17:36 | dom96_and | Uhh. The deadline is this Friday. |
11:17:46 | BitPuffin | oh you mean submisison |
11:17:53 | BitPuffin | I thouhght you meant the whole thing |
11:18:50 | * | epsylon quit (Ping timeout: 252 seconds) |
11:23:18 | * | epsylon joined #nimrod |
11:36:29 | Araq | skrylar: were you the guy telling me how unicode works? :P |
11:37:05 | Araq | I argue for years utf-32 is a variable length encoding much like utf-8 is ... |
11:45:22 | skrylar | Araq: nah, i was mentioning that runes don't account for the combining marks |
11:45:34 | skrylar | in terminology |
11:48:36 | Araq | I know |
11:48:51 | Araq | but the unicode module is old :P |
11:51:31 | skrylar | :P |
11:51:37 | skrylar | I should see if I still have my old C code for that around |
11:51:45 | skrylar | I think I do, somewhere |
12:01:29 | skrylar | yay line wrapping code :| |
12:04:52 | Araq | zahary: taking the address of a generic proc should require 'procvar' just like non-generics do |
12:05:30 | Araq | otherwise some fool passes stdlib.foo to 'map' and we can never add default arguments to stdlib.foo without breaking code |
12:06:05 | * | Araq still thinks taking the address of a routine you don't own is offensive |
12:06:17 | skrylar | Araq: compiler warning? |
12:06:55 | Araq | skrylar: I'm not against warnings, but what does this solve here? it should simply be forbidden |
12:07:59 | skrylar | different modules in the same package by the same developer? |
12:08:43 | Araq | skrylar: we have that in the compiler. we annotate with 'procvar' and it really helps readability anyway IMO |
12:09:11 | skrylar | i was just trying to think of a use case with that, since i'm normally for letting people shoot themselves in the foot if they want to |
12:09:17 | Araq | it's nice to see it's called indirectly |
12:09:33 | Araq | I also love the .thread annotation |
12:09:36 | skrylar | "smarter than you" compilers get really annoying if they accrue too many "you can't do that because i said so"'s |
12:10:10 | * | ddl_smurf quit (Quit: ddl_smurf) |
12:10:25 | Araq | it's not about the compiler being "smarter" |
12:10:35 | Araq | it's about being explicit about contracts |
12:11:10 | Araq | you have to say "yes, you are allowed to take the address of this proc as I never change its interface" |
12:12:01 | Araq | "it won't become a template in the fturue. nor will the types differ slightly (int -> int32), nor will it ever get additional default parameters" |
12:12:20 | Araq | it's a strong commitment really |
12:30:19 | * | dom96_and quit (Quit: Bye) |
12:34:52 | * | OrionPK quit (Remote host closed the connection) |
13:28:08 | * | darkf quit (Quit: Leaving) |
13:33:43 | * | dmac quit (Ping timeout: 260 seconds) |
13:47:55 | * | [1]Endy joined #nimrod |
13:48:14 | * | OrionPK joined #nimrod |
13:57:21 | * | aftersha_ joined #nimrod |
14:05:16 | * | [1]Endy quit (Ping timeout: 245 seconds) |
14:18:23 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
15:35:00 | OrionPK | araq you figure out the reported memory use vs. task manager's memory use? |
15:35:55 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:37:30 | * | noam_ joined #nimrod |
15:40:21 | * | noam quit (Ping timeout: 260 seconds) |
15:40:38 | * | ics joined #nimrod |
15:44:31 | * | [1]Endy joined #nimrod |
16:21:33 | * | tdc joined #nimrod |
16:27:14 | * | aftersha_ joined #nimrod |
16:38:09 | * | [2]Endy joined #nimrod |
16:38:58 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
16:42:05 | * | [1]Endy quit (Ping timeout: 272 seconds) |
16:55:31 | * | ddl_smurf joined #nimrod |
16:56:46 | * | tdc quit (Quit: Leaving) |
17:13:41 | * | tdc joined #nimrod |
17:28:20 | * | io2 joined #nimrod |
17:38:32 | Araq | OrionPK: sorry, haven't looked at it again |
17:53:04 | * | carum joined #nimrod |
17:54:23 | * | DAddYE joined #nimrod |
17:57:35 | * | brson joined #nimrod |
18:00:03 | * | aftersha_ joined #nimrod |
18:03:22 | EXetoC | So you want MongoDB in nimrod-code then? |
18:03:28 | Araq | yes |
18:03:37 | BitPuffin | what |
18:03:41 | Araq | or somewhere else, it doesn't matter |
18:03:46 | Araq | just make it a babel package |
18:03:57 | BitPuffin | oh you mean database adapter? |
18:04:27 | EXetoC | the modules in the std lib will be moved |
18:05:02 | BitPuffin | yeah they should |
18:05:13 | EXetoC | I can add it there. Either make me a member or create the repository and I'll make a PR some time this week |
18:06:47 | BitPuffin | EXetoC: so you have access to it? |
18:06:51 | BitPuffin | I feel so discriminated |
18:06:57 | BitPuffin | I came here around the same time as EXetoC |
18:07:38 | EXetoC | no I've only been submitting pull requests |
18:08:01 | Araq | bbl |
18:10:37 | * | EXetoC quit (Quit: WeeChat 0.4.2) |
18:11:05 | Varriount | BitPuffin: I found you a friend -> http://www.tapirback.com/tapirgal/gifts/friends/birds/puffin-stuffed-audubon-bird-f1878.jpg |
18:12:24 | BitPuffin | Varriount: buy it and ship it to me |
18:13:04 | * | EXetoC joined #nimrod |
18:14:11 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
18:18:11 | Araq | ping zahary |
18:22:55 | * | micklat joined #nimrod |
18:26:43 | * | xtagon joined #nimrod |
18:37:07 | micklat | is there some equivalent to: from a.b.c import d as qux? |
18:37:14 | micklat | or any plans to provide such a facility? |
18:37:25 | * | BitPuffin quit (Ping timeout: 250 seconds) |
18:37:57 | Araq | no, you can only alias module names with 'as' |
18:38:29 | Araq | and people fought long and hard with me to get even that :P |
18:40:30 | Araq | I consider 'as' a code smell tbh, it's like saying "ooh you should use foo.bar.baz.fu to respect some hierarchy but of course that's verbose and childish so you should introduce your own abbrevs" |
18:40:49 | micklat | well, what's wrong with that? |
18:41:03 | micklat | is there some example for "as"? didn't see it in the manual |
18:41:15 | Araq | check the manual for 0.9.3 |
18:41:29 | micklat | thanks |
18:42:08 | Araq | System.Text.RegularExpressions.Regex # .NET |
18:42:56 | Araq | System.Configuration.ConfigurationManager.AppSettings iirc |
18:43:21 | micklat | you mean those are module names? |
18:43:22 | Araq | 'as' is a patch for names like these |
18:43:33 | micklat | yeah, but I like hierarchies |
18:43:39 | Araq | yeah but I don't |
18:43:42 | micklat | it's a good patch |
18:45:36 | Araq | this whole notion of avoiding abbrevs for readability is wrong and misguided and shows a great ignorance of how human language works |
18:45:48 | reactormonk | I get a nil here: https://gist.github.com/reactormonk/a3e943ce2a9235b4c1be but I can't find out where the porblem is. The two .csv are the sqlite tables used. Any ideas? |
18:46:05 | reactormonk | planetary_interaction.nim(168) planetary_interaction |
18:46:07 | reactormonk | sets.nim(40) produceItem |
18:46:43 | * | BitPuffin joined #nimrod |
18:46:46 | micklat | Araq: care to elaborate your thesis? |
18:46:52 | Varriount | dom96, Araq: I'm working on formatting and cleaning up the GSoC ideas list |
18:47:19 | micklat | I'm leaving the abbreviation to the user |
18:47:19 | reactormonk | dom96, you signed up for GSoC? |
18:48:00 | Araq | micklat: the common words tend to be short, common programming terms should be short too and shortened if too long |
18:48:32 | micklat | well, we don't all get to write the common words |
18:48:39 | micklat | most of us, in fact, write the uncommon ones |
18:48:56 | micklat | short names are good for a standard lib, so I see where you're coming from |
18:49:35 | Varriount | micklat: Have you seen the GSoC Ideas list yet? |
18:49:49 | micklat | no, I've only been here for, like, 3 days |
18:50:26 | Varriount | micklat: Never too early to learn -> https://github.com/Araq/Nimrod/wiki/GSoC-2014-Ideas |
18:50:44 | Araq | reactormonk: sorry, I have no idea |
18:51:19 | * | Mat3 joined #nimrod |
18:51:27 | Mat3 | hi all |
18:51:42 | micklat | I kinda like what I'm doing now (bindings to python and lua) |
18:51:55 | reactormonk | Araq, the stacktrace is kinda off |
18:51:57 | reactormonk | sets.nim(40) produceItem |
18:53:44 | Varriount | micklat: Good! |
18:54:03 | Varriount | Having bindings for scripting languages is quite useful. |
18:54:06 | reactormonk | there's one missing. |
18:54:39 | Varriount | I know Araq would rather have us believe that Nimrod is perfect for everything, but dynamic scripting languages do excel at certain tasks. |
18:55:10 | Mat3 | can you please precise your statement ? |
18:55:58 | reactormonk | wasn't there an option to help gdb a bit? |
18:56:31 | Mat3 | (not, that I would disagree, only curious) |
18:56:42 | * | aftersha_ joined #nimrod |
18:57:11 | micklat | reactormonk: you mean beside --debuginfo --lineDir:on --threads:on ? |
18:57:58 | tdc | hi. can someone tell me if it's possible to use nested tables; i.e. similar to TTable[string, TTable[string, string]] ? |
18:58:08 | reactormonk | nice |
18:58:22 | reactormonk | #0 0x00000000004381de in produceitem_133597 (reactions=..., item=0x7fffffffe160) |
18:58:24 | reactormonk | at /home/tass/dev/nimrod/Nimrod/lib/pure/collections/sets.nim:40 |
18:58:26 | reactormonk | ^ what. |
18:58:58 | reactormonk | tdc, what speaks against it? |
18:59:34 | tdc | It compiles but doesn't do what I want... Given a var t of the aforementioned type.... |
18:59:44 | reactormonk | tdc, you want mget |
18:59:48 | tdc | t["one"] returns a copy |
19:00:00 | tdc | Aah - thanks! |
19:00:41 | reactormonk | any way to explicitly print the backtrace? seems to be a bug there. |
19:01:13 | Araq | use gdb and invoke 'bt' in there |
19:02:22 | Varriount | Araq: Was it hard, getting the nimrod compiler to generate information that GDB could use? |
19:03:22 | Varriount | I mean, I know that nimrod support for gdb isn't advanced as, say, C++ (which is to be expected) but GDB handles nimrod code surprisingly well. |
19:03:33 | EXetoC | Varriount: The only thing that's missing is the unimplemented VM features IMO. I can't stand dynamic typing |
19:03:49 | Varriount | EXetoC: To each his own. :3 |
19:04:25 | EXetoC | yeah |
19:04:30 | * | Varriount uses 'x = 3, x = "foo"' on EXetoC |
19:05:27 | micklat | I'd appreciate some early feedback on my little project https://github.com/micklat/NimBorg |
19:05:38 | micklat | if you hate the name, or the directory structure, or the general approach |
19:05:41 | micklat | go ahead and say so |
19:05:54 | Varriount | micklat: Documentation is my best friend. |
19:06:21 | micklat | good point |
19:06:26 | * | BitPuffin quit (Ping timeout: 265 seconds) |
19:06:51 | micklat | there's almost something worth documenting already |
19:06:58 | Varriount | micklat: Except internals. |
19:07:10 | micklat | ? |
19:07:24 | * | brson quit (Ping timeout: 265 seconds) |
19:09:15 | micklat | Varriount: I don't understand the bit about internals. What do you mean? |
19:09:35 | dom96 | reactormonk: not uet |
19:09:35 | Araq | micklat: only skimmed it but it looks superb |
19:09:38 | dom96 | *yet |
19:09:46 | micklat | wow, thanks |
19:10:23 | Mat3 | micklat: I think your general approach is fine. I am only a bit sceptical about the usefulness of phyton bindings |
19:10:49 | micklat | how so, Mat3? |
19:11:09 | Mat3 | I mean, what applications have you in mind ? |
19:11:37 | micklat | Well, I have no particular application in mind, but I come from scientific computing, where nimrod is currently rather weak, and python is very strong |
19:11:48 | EXetoC | there are so many reasons why you'd want a bridge |
19:12:25 | * | Varriount|Mobile joined #nimrod |
19:12:51 | Varriount|Mobile | Sorry, laptop baty |
19:13:02 | Varriount|Mobile | battery died |
19:13:16 | Araq | micklat: ELuaTypeError is somewhat of a misnomer, since the 'E' stands for exception already; it should be EInvalidLuaType |
19:13:37 | micklat | Araq: not sure about that. |
19:13:44 | micklat | It's not that the object has an invalid type |
19:13:47 | Varriount|Mobile | Unfortunately, not many stop to consider that internal documentation is important |
19:13:50 | micklat | a table is a fine type to have |
19:14:12 | micklat | Varriount: Ah, I see |
19:14:12 | Araq | however we'll get rid of the type prefixes and then it should be LuaTypeError ... oh well |
19:14:22 | Varriount|Mobile | without internal documentation, contributers have a very hard time improving code |
19:14:46 | micklat | I see |
19:14:56 | Mat3 | Can someone tell me a specific reason for Phyton bindings (would be nice, because I see none) ? |
19:15:05 | micklat | Araq: you want to get rid of all prefix? |
19:15:06 | EXetoC | he told you |
19:15:07 | Varriount|Mobile | Plugins |
19:15:20 | micklat | I mean, T is silly, but P and E do have a meaning |
19:15:20 | Mat3 | ah ok, makes sense |
19:15:25 | Varriount|Mobile | Dynamic loading of plugins, like for games |
19:15:28 | Araq | micklat: after 0.9.4 is out, yeah |
19:16:06 | Araq | T is not that silly, is stands for "value Type" ;-) |
19:18:40 | reactormonk | this is a key in the table: 0x7f68351c9820"2389". This is the value I'm asking with hasKey() for: 0x7f68351adfc8"2389" - returns false. |
19:19:41 | reactormonk | apparently it doesn't like strings. Use ints instead? |
19:20:55 | reactormonk | nope, doesn't help. |
19:21:37 | * | askatasuna quit (Quit: WeeChat 0.4.2) |
19:21:39 | reactormonk | hm, does. |
19:22:01 | EXetoC | micklat: we'll migrate to Foo/FooPtr/FooRef/FooError or something like that |
19:22:05 | EXetoC | Err? |
19:22:23 | micklat | how is this an improvement? |
19:22:23 | reactormonk | hum. |
19:23:16 | * | Varriount|Mobile quit (Remote host closed the connection) |
19:23:48 | Varriount | Sorry, back |
19:24:04 | EXetoC | micklat: some people strongly dislike what we have now apparently |
19:24:17 | Varriount | My laptop battery ran out near theend of class, and I wasn't able to plug in my charger. |
19:24:49 | micklat | but nobody's complaining about c's case and underscore handling |
19:25:14 | micklat | are the prefixes the problem? I thought it was the case-and-underscore insensitivity |
19:25:25 | micklat | which I don't like, BTW |
19:26:22 | Mat3 | Araq: What are the reasons for that change again ? |
19:26:34 | dom96 | micklat: Why do you dislike it? |
19:26:53 | EXetoC | I can never remember exactly, but I don't see a problem with keeping those other prefixes, but I think some people also dislike not specifying 'ref' and 'ptr' |
19:27:18 | Araq | Mat3: we're growing too slowly, can't be bad to care more about popularity |
19:27:38 | micklat | In my extremely short experience, it's easy to get namespace pollution in nimrod. |
19:27:57 | micklat | with underscore sensitivity, you have a bigger namespace |
19:28:00 | micklat | so fewer collisions |
19:28:09 | micklat | same for case |
19:28:23 | Araq | micklat: that's a weak argument |
19:28:49 | micklat | you like brevity, right? |
19:28:56 | Araq | so you have fooBar and foo_bar and _foo_bar, in the same scope, yay |
19:29:12 | Araq | that's just another desaster |
19:29:21 | micklat | yes, I only care about one of them, the other two are defined by other modules that I'd actually rather not know about |
19:29:36 | micklat | I always spell it foo_bar, no problem for me |
19:29:39 | Araq | that's wishful thinking |
19:29:52 | Araq | in fact, foo_bar shouldn't exist in the first place |
19:29:57 | reactormonk | how come there's no `$` for seq? |
19:30:08 | Araq | consistency means it's fooBar everywhere |
19:30:18 | micklat | ugh, camelCase is ugly! |
19:30:25 | micklat | ok, enough with the bikeshedding |
19:30:28 | Araq | camelCase is MORE readable |
19:30:31 | micklat | I'm going to shut up |
19:30:54 | * | vbtt joined #nimrod |
19:30:59 | reactormonk | Araq, that's a matter of habit. |
19:31:00 | Varriount | I don't care what style is chosen, as long as it's consistant throughtout the stdlib |
19:31:16 | Varriount | Or else we get PHP |
19:31:28 | reactormonk | Araq, unless you wanna bring up some science. |
19:31:56 | dom96 | micklat: With style insensitivity you can choose not to use camelCase :P |
19:32:22 | Araq | reactormonk: the studies I know are worthless, but note that F# went from foo_bar to fooBar because foo_bar looks too much like foo bar |
19:32:27 | EXetoC | it doesn't make much sense otherwise imo |
19:33:01 | micklat | the real problem is that it's too easy to get namespace collisions, I suppose |
19:33:13 | micklat | or maybe I'm using import the wrong way |
19:33:18 | vbtt | heh - camelcase makes me want underscore/case insensitivity so I can write snake_case |
19:33:25 | Mat3 | I think the fight for naming conventions is fundamentally a psychological problem of human nature (limitations) |
19:33:41 | vbtt | but, i'm trying to look beyond the style. |
19:33:44 | EXetoC | micklat: symbols can be fully qualified, so that's not a big issue imo |
19:34:14 | vbtt | i find underscores more readable than cameCase, btw. also prettier :) |
19:34:14 | micklat | I'd rather not get stopped by the mysterious compiler error in the first place |
19:34:18 | Mat3 | let's overcome it |
19:34:41 | EXetoC | micklat: also, you can force module qualifications if you want |
19:34:48 | Araq | I argue fooBar is objectively easier to read :P |
19:35:02 | vbtt | if you're going to have space sensitivity, just allow hyphenated-names |
19:35:04 | vbtt | ;) |
19:35:14 | Araq | because it makes the *structure* of the code much clearer |
19:36:06 | Araq | the different words within an identifier should not be emphasized, so foo_bar is wrong |
19:36:13 | reactormonk | vbtt, I'm in for hyphens ;-) |
19:36:21 | EXetoC | I prefer the shortest possible names that make sense :-) |
19:36:29 | dom96 | let's allow ? and ! in proc names while we're at it., |
19:36:42 | reactormonk | ^ I approve. |
19:37:01 | micklat | dom96: makes sense, but I think we want Nimrod to be popular, no? |
19:37:02 | reactormonk | And # for fuck's sake. |
19:37:07 | vbtt | if request.is-pending?: ... |
19:37:16 | micklat | vbtt: looks great |
19:37:16 | reactormonk | vbtt, either is- or ? |
19:37:32 | vbtt | i've seen a language with spaces allowed in identifiers. |
19:37:39 | dom96 | I thought people loved that crap? :P |
19:37:49 | vbtt | an it was space/underscore/case insensitive |
19:37:52 | dom96 | Ruby allows ? in proc names right? |
19:37:53 | vbtt | *and |
19:37:53 | micklat | um, actually, an if is not a question |
19:37:56 | reactormonk | dom96, yup |
19:38:09 | Varriount | Hm. Is it 'API' or 'api', and are multiple prefixed with simply an 's', or an " 's "? |
19:38:15 | vbtt | well the ? usually implies boolean result. |
19:38:18 | vbtt | anyway, i'm just j/k. |
19:38:30 | vbtt | .. about all of this. |
19:38:49 | dom96 | yes, same here :P |
19:39:04 | reactormonk | dom96, actually, only at the end of a method name |
19:39:27 | vbtt | Araq:if you want to be more popular, yes, case+underscore sensitivity will help. |
19:39:58 | Mat3 | why should 'this_is_a_special_identifier' be more readable than 'thisIsASpecialIdentifier' ? |
19:40:01 | vbtt | Also, more blogs and docs about internals of nimrod's implementation. interesting projects implemented in it, etc. |
19:40:20 | Mat3 | and why are prefixes for types a bad idea ? |
19:40:21 | vbtt | people don't want to spend time digging too deep into code. |
19:40:38 | dom96 | If we want Nimrod to be more popular we need corporate backing. |
19:41:02 | Varriount | dom96: Or at least apply for grants |
19:41:17 | vbtt | Mat3:because i can break it up easily by visible space. |
19:41:23 | Araq | dom96: if I change the tester to produce a diff in the JSON how fast can you adapt the builder? |
19:42:19 | vbtt | type prefixes are annoying. I don't remember when I was last confused about whether a Foo was a type or a value - it's usually obvious given the context. |
19:42:33 | vbtt | so i'm not sure what the purpose of type prefixes are. |
19:42:40 | vbtt | *is. |
19:42:50 | micklat | vbtt: a short way to write both Foo and PFoo |
19:42:53 | micklat | brevity |
19:42:59 | dom96 | The point is to know whether a type is a pointer or a value type. |
19:43:10 | vbtt | micklat:oh, I meant TFoo |
19:43:15 | vbtt | yeah PFoo is fine. |
19:43:27 | vbtt | or FooPtr, i don't care about that. |
19:43:36 | vbtt | but the core type doesn't need T. |
19:43:42 | micklat | same here |
19:44:11 | dom96 | Araq: argh. Hard to say. I've got a deadline in school on Thursday. But I am off school on Friday. |
19:44:19 | dom96 | GSoC needs to be sorted though. |
19:44:45 | Araq | dom96: wrong answer |
19:44:51 | EXetoC | vbtt: case-insensitivity |
19:45:06 | Araq | right answer would have been "takes me half an hour" |
19:45:17 | Araq | "and I will do it right now" |
19:45:19 | EXetoC | that's all. actually, I do like the symmetry |
19:45:34 | vbtt | EXetoC:ah i see, another reason to not have case-insensitivity :) |
19:46:08 | vbtt | so with snake_case you'll attrace C and Python folks. with CapitalizedNames you'll attract Java and C# folks. Not sure who you attract with camelCase ;) |
19:46:35 | * | brson joined #nimrod |
19:47:20 | Araq | snake_case is barbaric and even python calls it startswith, not starts_with |
19:47:32 | vbtt | Araq:Python makes an exception for stdlib only. |
19:48:06 | Araq | vbtt: why? |
19:48:07 | vbtt | see pep 8 |
19:48:26 | micklat | I've been coding python for a decade and I still hate camelCase |
19:48:41 | dom96 | Araq: Oh, in that case that'll be 1 BTC. |
19:48:45 | Varriount | Could you guys stop arguing about things that you'll never change your minds about, and be productive? |
19:49:05 | Varriount | dom96: https://github.com/Araq/Nimrod/wiki/GSoC-2014-Ideas |
19:49:30 | Varriount | Should I add horizontal lines after each item? |
19:51:10 | dom96 | Varriount: hrm, if it looks good. The bold already emphasises that it's a different item I think. |
19:51:28 | xtagon | Varriount, no, it looks fine |
19:51:53 | EXetoC | Varriount: I can't remember if there were any good arguments in favor of PFoo -> FooPtr etc, that's all |
19:52:02 | EXetoC | Araq: did I even get that right? ^ |
19:52:29 | Varriount | dom96, Araq: You'll have to put the required/preferred skills for some of the ideas (like coroutines) as I have no idea what is needed for those. |
19:53:15 | vbtt | micklat:but python doesn't use camelCase? |
19:53:41 | Araq | python does use CapitalizedNames for classes iirc |
19:53:56 | vbtt | Araq:correct. |
19:54:36 | Araq | the argument usually is "foo_bar is more readable unless it's some other entity which we happen to encode with CapitalizedNames" |
19:54:52 | vbtt | Araq: ClassName. function_name, method_name, module_name, local_var_name, MODULE_CONSTANT_NAME, _private_method, _private_instance_var |
19:54:55 | Mat3 | Varriount: thanks |
19:55:17 | Araq | in other words the argument really argues for a form of hungarian notation, not for "underscores are more readable" |
19:55:30 | micklat | vbtt: it seems like I mistook the convention at my first workplace for the standard |
19:55:46 | micklat | Araq: those are two separate issues |
19:55:54 | Araq | if they were more readable, they would be used regardless of the identifier's entity |
19:56:07 | Araq | but they are not, so the argument makes no sense |
19:56:18 | micklat | Aren't you elevating PEP8 to a godlike status? |
19:57:18 | micklat | I mean, the fact that some convention became PEP8 doesn't prove anything about readability |
19:57:24 | vbtt | Araq: but ClassName helps readability in this case. it is a form of hungarian notation (or, name style determining kind of object) but you still choose the more readable styles. |
19:57:43 | Mat3 | Araq: I decided to write a simple coroutine library beside my work (to be precise I port an old Pascal library) |
19:57:53 | vbtt | micklat:yeah i'm not saying adopt python's style. |
19:58:15 | vbtt | but just that python uses underscore_names often (methods, variables etc.) |
19:58:50 | Araq | vbtt: it's very well to do what Python does, but it's important to get your logic right |
19:58:52 | vbtt | nimrod can keep camelCase, you'll probably still use another style for user defined types, right? |
19:59:09 | Araq | if you want to encode the entity in the identifier, just say so |
19:59:27 | Araq | don't pretend "underscores are more readable" when you in fact picked any style there is |
19:59:39 | Araq | to encode the entity with it |
20:00:11 | Mat3 | I have a finite solution: We just use symbols for everything ;) |
20:00:11 | micklat | but what about acronyms? |
20:00:27 | micklat | Isn't TcpSocket terrible? |
20:00:35 | Varriount | Araq: Is there anything special about "newWideCString" proc that I should be careful with? When I use it, I get a runtime crash in gc.nim, in assgnRefNoCycle |
20:01:12 | Araq | micklat: TCPSocket is worse imho |
20:01:23 | vbtt | Araq: uderscore_case is what I find more readable. Python uses it extensively. I didn't make any logical connection between those two. |
20:01:35 | micklat | TCP_socket! |
20:01:42 | Araq | and acronyms are just as case insensitive as anything else |
20:02:01 | Araq | just look at any URL, it starts with "http" not with "HTTP" |
20:02:17 | micklat | I think you're being very selective in your observation |
20:03:40 | Araq | *shrug* I know people remember a word's sound and not its spelling |
20:03:58 | micklat | that's true |
20:04:23 | Araq | Varriount: newWideCString is not special |
20:04:34 | Araq | you have some other problem |
20:05:53 | reactormonk | Araq, are the acronyms offending your case-based feelings? |
20:06:23 | Varriount | Araq: Oh. It appears that newWideCString fails if used in the top level. Odd |
20:07:29 | Araq | reactormonk: not at all, I like them |
20:08:13 | reactormonk | tl;dr: case insensitivity will stay because we can't agree on snake_case vs. camelCase anyway |
20:08:21 | vbtt | will it? |
20:08:30 | vbtt | I thought it's going away? |
20:08:33 | reactormonk | vbtt, I'm pretty sure Araq wants to kick it. |
20:08:39 | reactormonk | I however doubt it's gonna happen |
20:09:02 | vbtt | even camelCase is better than case-insensitivity, IMO (until we are all using the magical IDEs that fix the style for us) |
20:09:46 | reactormonk | is there a `$` for seqs somewhere or should I open an issue? |
20:09:56 | vbtt | being able to use standard search tools and editors is a big win for popularity. |
20:10:06 | Araq | reactormonk: make a PR |
20:10:30 | Araq | vbtt: standard search tools and editors are all awful :P |
20:10:39 | reactormonk | Araq, sequtils or system? |
20:10:45 | vbtt | Araq:agree, but point about popularity still stands. |
20:10:48 | Araq | reactormonk: system |
20:10:58 | Araq | vbtt: yeah, you can't argue against that one |
20:11:39 | EXetoC | "proc `$`*[T](a: openArray[T]): string" so what was up with that? |
20:12:02 | vbtt | so you can disallow both fooBar and FooBar in the same code (i.e force ppl to use the style used at defintion) |
20:12:25 | vbtt | anyway, bbl. |
20:12:28 | Araq | vbtt: that's exactly what I wanted to avoid |
20:12:34 | * | foodoo joined #nimrod |
20:12:53 | Araq | because the guy who wrote the definition is often foolish |
20:13:04 | Araq | and doesn't adhere to my style :P |
20:13:28 | Araq | just look at micklat's code for proof |
20:13:58 | Araq | it's very nice code and I like to use it, but I want to write fooBar and he wrote foo_bar in his definitions |
20:14:28 | foodoo | I don't know why, but I'm a fan of the snake_case convention ;) |
20:14:50 | EXetoC | reactormonk: I think the block at line 1675 needs to be removed then |
20:15:00 | EXetoC | and instead have overloads for all relevant types or something like that |
20:15:20 | Araq | EXetoC: dunno if we want to distinguish between @[] and [] for $ |
20:15:29 | Araq | *for $'s output |
20:15:43 | EXetoC | no I don't think so |
20:17:03 | EXetoC | Including @ is trivial anyway |
20:18:14 | EXetoC | ok so what about equality? |
20:18:31 | reactormonk | Araq, done. |
20:18:46 | reactormonk | EXetoC, maybe. It's commented out. |
20:19:00 | reactormonk | Araq, hmm, wait. |
20:19:15 | Varriount | Hello foodoo |
20:19:30 | foodoo | hello Varriount |
20:20:00 | EXetoC | reactormonk: it has been for ages, but you're right it doesn't matter |
20:21:20 | * | AndChat|206976 joined #nimrod |
20:22:08 | AndChat|206976 | Araq: then why not have the compiler enforce a style? |
20:22:19 | AndChat|206976 | Oops |
20:22:33 | * | AndChat|206976 is now known as vbtt_ |
20:23:01 | * | carum quit (Remote host closed the connection) |
20:23:11 | reactormonk | Araq, updated. |
20:23:31 | Araq | vbtt_: I considered it, but found it too annoying |
20:23:50 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
20:24:18 | vbtt_ | Annoying for who? Did you want to break the rule occasionally? |
20:25:00 | Araq | yes I do. Plus enforcing the one and only true style upon people is fascism |
20:25:09 | vbtt_ | imagine the time saved by teams not arguing over their style guide. |
20:25:34 | Araq | lol |
20:25:45 | vbtt_ | No I'm serious |
20:25:54 | Araq | nimrod's style insensitivity accomplishes the same |
20:25:58 | vbtt_ | It's a practical choice |
20:26:08 | foodoo | Even Google says that the coding conventions that they have should be broken if it makes sense |
20:26:37 | vbtt_ | Why not add begin/end while you r giving everybody their freedom? |
20:27:15 | Araq | actually the original idea was to support indendation, {} and 'end X' .... |
20:27:29 | reactormonk | Araq, how come you didn't? Too complicated of a parser? |
20:27:31 | Araq | it's just that indentation based parsing is the hardest to get right, so I started with that ... |
20:27:51 | reactormonk | lol. |
20:28:23 | foodoo | vbtt_: The two programming languages Vala and Genie are somewhat the same. But the first one uses a C#-like syntax and Genie uses a Python-like syntax. They use the same compiler. |
20:28:32 | EXetoC | we'll still have formatting tools |
20:28:34 | vbtt_ | You can have an ugly workaround for those wanting to break the rules . |
20:29:15 | vbtt_ | yeah I understand the semantic.. syntactic decoupling. |
20:29:29 | foodoo | I haven't looked but into Nimrod's macro and template system, but isn't Nimrod powerful enough to support something like begin ... end? |
20:29:47 | foodoo | but->yet |
20:30:04 | vbtt_ | but unfortunately we live on a world with text editors.. not semantic editors. |
20:30:43 | reactormonk | foodoo, might actually work. |
20:30:55 | Araq | vbtt_ what you propose is reasonable though and we'll get that |
20:31:32 | Araq | cause I'm tired of arguing against the masses who can't even imagine tools that are not stuck in the 60ies |
20:33:06 | vbtt_ | If nimrod is strict now it can always get lenient later. |
20:33:51 | foodoo | Araq: What kind of modern tools do you have in mind? |
20:35:13 | Araq | foodoo: Delphi 5 was pretty good; slim IDE for today's standards but supported most important stuff |
20:35:41 | foodoo | Never looked into the Pascal family or the tools from that family |
20:35:50 | Araq | many people live in extremes, either Eclipse or Vim |
20:36:26 | foodoo | Well, I'm mostly a Vim user, but I'm also fine with LightTable |
20:37:11 | vbtt_ | Smalltalk ides stored code as graph data and only transient converted to text for editing afaik. |
20:37:17 | * | tdc quit (Quit: Leaving) |
20:37:58 | reactormonk | Araq, I actually like ensime + emacs for scala |
20:38:21 | reactormonk | as soon as #804 is fixed, I might get somewhere similar for nimrod |
20:38:27 | OrionPK | lighttable for nimrod plz |
20:39:23 | reactormonk | OrionPK, what happened to that btw? |
20:39:30 | OrionPK | what happened to what? |
20:39:50 | foodoo | OrionPK: But Nimrod would need to support JIT compilation, wouldn't it? |
20:39:52 | reactormonk | https://github.com/LightTable/ ah. |
20:40:19 | OrionPK | foodoo only to make use of some of the zanier features |
20:40:23 | OrionPK | it's still a good general purpose editor |
20:40:31 | OrionPK | and it can pop in documentation panes and such |
20:41:15 | * | AndChat|206976 joined #nimrod |
20:41:16 | * | vbtt_ quit (Read error: Connection reset by peer) |
20:41:17 | foodoo | OrionPK: Inline documentation is currently not one of LT's strong points (Tried it with Clojure something like 2 months ago) |
20:41:19 | * | AndChat|206976 quit (Client Quit) |
20:41:35 | * | AndChat|206976 joined #nimrod |
20:41:36 | foodoo | But maybe I just don't know how to use the features properly |
20:42:25 | * | BitPuffin joined #nimrod |
20:47:08 | vbtt | there's no easy escape from the text based word - consider source repositories, editors, search tools. in a better word the would work with semantic structure instead of flat text and and could be much more useful. |
20:47:42 | vbtt | is nimrod's philosophy that "surface syntax shouldn't matter" ? |
20:48:12 | vbtt | or rather - choose your own syntax.. |
20:48:58 | Araq | vbtt: the philosphy was "one AST, multiple representations" |
20:49:11 | foodoo | vbtt: nah, that would be Scala's philosophy ;) |
20:49:24 | vbtt | hehe @foodoo |
20:50:12 | vbtt | Araq: why 'was'? |
20:50:26 | vbtt | is nimrod not that principled anymore? |
20:50:31 | Varriount | Hm. Interesting. CPython C conventions seems to be that long argument declarations shouldn't be broken up into lines |
20:51:13 | foodoo | Indeed interesting. Could this have something to do with documentation generator parsers? |
20:51:29 | foodoo | because otherwise I don't see a point in that convention |
20:51:29 | Varriount | I don't know |
20:51:58 | Araq | vbtt: no, we'll get 1 syntax plus enforced naming scheme |
20:52:07 | vbtt | oh nice! |
20:52:08 | Varriount | foodoo: I'm currently experimenting with code styles in winlean.nim (the wrapper the stdlib uses to wrap needed windows api procedures) |
20:52:29 | Varriount | There must be some better style than the current hodgepodge |
20:52:39 | reactormonk | Any way to get https://github.com/ruby/ruby/blob/trunk/numeric.c#L656 to floats in nimrod? |
20:53:25 | vbtt | Araq: I fully support one AST, multiple representations in principle. |
20:53:29 | foodoo | Varriount: The version of winlean.nim on Github? |
20:53:43 | Varriount | foodoo: Well, yes, however I'm editing my local copy |
20:54:21 | * | [2]Endy quit (Ping timeout: 250 seconds) |
20:54:27 | foodoo | And you don't like the inconsistent line breaks in argument lists? |
20:54:30 | vbtt | If it is *easy* to define new syntaxes for the AST, people will do it and you can have easy conversion from syntax1 -> AST -> syntax2. |
20:54:49 | Varriount | foodoo: No. At least, not with veryLongArgumentNames |
20:55:18 | Varriount | And I also *gasp* prefer long pragma's on separate lines. |
20:55:39 | Varriount | Escpecially for procedure *declarations* |
20:57:11 | * | carum joined #nimrod |
20:57:24 | Varriount | foodoo: I have a strong belief in this -> http://naildrivin5.com/blog/2013/05/17/source-code-typography.html |
20:57:59 | foodoo | thanks. Looks interesting |
20:59:13 | Varriount | foodoo: Also, the style conventions that work for one language, like say, python, won't neccesarily work well for another language, like nimrod. |
20:59:26 | reactormonk | Araq, will setLen for a string set the trailing zero? |
20:59:59 | Varriount | Take procedure parameters - in python, the parameters have no set type, so there is arguably less information for the reader to process per parameter |
21:00:00 | vbtt | yeah nimrod differs from python in one core principle: there should be one obvious way to do it. |
21:00:13 | * | awestroke joined #nimrod |
21:00:23 | vbtt | i suppose it's somewhat true in nimrod semantically, but you have multiple syntax choices. |
21:00:34 | Mat3 | ciao |
21:00:40 | Varriount | But in nimrod, procedure have double the amount of information - the name, and the type (which can be a complex declaration in some cases) |
21:00:45 | foodoo | Varriount: Well, but you still have to understand what kind of types you can use with a function |
21:00:51 | * | Mat3 quit () |
21:01:12 | foodoo | So there's implicit information |
21:01:23 | Araq | reactormonk: yes |
21:01:28 | Varriount | foodoo: True |
21:02:04 | Varriount | Maybe I'm wasting time - Araq will probably shoot down style changes to winlean - but at least it gives me something to do. |
21:02:54 | Araq | Varriount: if you want something to do, wrap the winapi with c2nim ... |
21:03:08 | Araq | this enormous windows.nim module has to die |
21:03:15 | Varriount | Araq: I could have sworn that was already done by windows.nim |
21:03:24 | * | awestroke quit (Remote host closed the connection) |
21:03:52 | reactormonk | Araq, can we use "%#.f" instead of "%#.16e" for floats? |
21:04:20 | Araq | Varriount: windows.nim has been translated from pascal, has way too many loc, has too many type aliases and might contain bugs |
21:04:31 | reactormonk | doesn't add a trailing zero, but at least it doesn't shit all over the place |
21:04:31 | Araq | no make that *does* contain bugs |
21:04:35 | Varriount | Araq: What kind of style do you prefer, when it comes to procedure that have many long-named parameters? |
21:04:53 | Araq | Win API has its own style |
21:05:05 | Araq | a classic problem |
21:05:18 | Araq | should we use win api's style or our own? |
21:05:29 | Varriount | Well, maybe winlean should be an exception. |
21:05:38 | reactormonk | Varriount, no exceptions please. |
21:05:48 | foodoo | OrionPK: How do I look up documentation in LT? |
21:05:49 | Varriount | reactormonk: Why not? |
21:06:01 | dom96 | When you're working with the WinAPI you're likely looking at the official MS docs. |
21:06:07 | OrionPK | foodoo for nimrod? |
21:06:11 | reactormonk | Varriount, because they are annoying |
21:06:14 | foodoo | OrionPK: no, Clojure |
21:06:15 | dom96 | It's easier to use the wrapper if its style is consistent with the docs |
21:06:23 | OrionPK | foodoo i have no idea, sorry |
21:06:34 | OrionPK | im a sublimetext user, not a LT user.. but I would love to try LT if someone made a nimrod plugin |
21:06:35 | Varriount | dom96: Or you're looking in winlean.nim to see how the winapi types match up to nimrod types. |
21:06:52 | foodoo | OrionPK: ah okay. I know some videos that show off how LT will one day show documentation but seems like it's not there yet |
21:07:15 | dom96 | Varriount: IMO the compiler needs a switch to tell you what these type aliases expand to. |
21:07:17 | OrionPK | foodoo i wouldnt be surprised if it is there for some languages, but not others |
21:07:18 | foodoo | OrionPK: oh, it's ctrl+d |
21:07:20 | vbtt | if you want to see impressive editors, look up bret victor |
21:07:29 | Varriount | dom96: winlean doesn't follow the MS Docs style |
21:07:34 | foodoo | OrionPK: when your cursor is at a documented entity |
21:08:48 | Araq | Varriount, dom96 IMO winlean should use *our* style |
21:08:57 | Varriount | Araq: Which is...? |
21:09:17 | Varriount | I would gladly follow the style, if it was written down somewhere. |
21:09:34 | Araq | TypesLikeThis, ConstantsLikeThis, everythingElseLikeThis |
21:09:35 | Varriount | We have naming conventions, but no style conventions. |
21:09:48 | vbtt | the pretty tool should fixup the style too |
21:09:56 | reactormonk | Araq, TTypesLikeThis |
21:10:11 | Araq | reactormonk: well that's the old style ... |
21:10:22 | Araq | :P |
21:10:35 | Varriount | Yes, but what about things like where line breaks should be, how should long argument lists be split, etc. |
21:10:43 | reactormonk | Araq, as you say |
21:11:00 | reactormonk | Araq, so you want to be case-sensitive on the first character? |
21:11:14 | Araq | reactormonk: we already are with --cs:partial |
21:11:25 | reactormonk | Araq, by default. |
21:11:38 | Araq | it will be the default after 0.9.4 is out |
21:11:43 | reactormonk | perfect. |
21:11:54 | reactormonk | Araq, mind glancing over my PRs? |
21:12:44 | OrionPK | i dont like procsLikeThis |
21:13:21 | Araq | OrionPK: --cs.partial means you can still write procs_like_this :P |
21:13:41 | OrionPK | i'd prefer procs_like_this or ProcsLikeThis :P |
21:13:43 | renesac | Araq, what was the convention defined for constants? |
21:14:04 | reactormonk | OrionPK, well, we can still have ProcsLikeThis if they're initializers and go down JS hell ,-) |
21:14:19 | renesac | btw, I preffer TypesLikeThis, procsLikeThis, local_variables_like_this |
21:14:25 | renesac | ?P |
21:14:27 | reactormonk | renesac, you can still have that |
21:15:11 | renesac | and I dont like TypePtr... |
21:15:34 | renesac | I've grown to like TType, PType... thought they still look a bit ugly |
21:15:49 | Araq | renesac: ;-) |
21:15:50 | renesac | at least they are consistent |
21:15:59 | renesac | and short |
21:17:27 | renesac | why the caller can't define "let x = ref Type" if he wants "let x = PType"? |
21:17:40 | renesac | this way we don't need type specifiers |
21:18:03 | reactormonk | dom96, nice wiki page |
21:18:08 | renesac | if you want a value type, you don't put the "ref"/"ptr", if you want a reference type, you use it |
21:18:19 | dom96 | reactormonk: Mostly Varriount's work :) |
21:19:06 | * | Varriount likes formatting things |
21:19:26 | * | renesac thinks some of that code typography to be excessive |
21:19:42 | renesac | the link, not the wiki |
21:19:54 | Varriount | renesac: Some, perhaps (like the spacing), however it's still something to keep in mind |
21:20:02 | Araq | renesac: I'm working on this for other reasons, but it's not easy |
21:20:21 | Araq | ptr Foo() is parsed as (ptr)(Foo()) |
21:20:29 | Araq | and not as (ptr Foo)() |
21:20:44 | renesac | hum |
21:21:34 | renesac | because this would be much nicer than having to know if a type is by default value or reference |
21:21:44 | Araq | and parsing ptr Foo() as (ptr Foo)() is disgusting |
21:21:45 | renesac | in the new naming scheme |
21:22:05 | Araq | renesac: I disagree slightly |
21:22:32 | Araq | often you do know what it is, or you know it has "handle like" semantics anyway (TFile, TSocket) |
21:22:52 | Araq | it's a problem for many wrappers though |
21:22:59 | vbtt | also you might need to refer to a type without knowing if it's a ref or ptr - in that case you need aliases anyway, no? |
21:23:32 | Araq | vbtt: that never happens IME |
21:23:44 | vbtt | ok |
21:23:58 | vbtt | I was thinking seq[T] but that will still work, I guess. |
21:24:06 | renesac | I would like the compiler tell me it is a "ref Foo" |
21:24:44 | renesac | not need to append Ptr to the name, or not append because it is the default |
21:25:31 | renesac | I need to rebase my fork of ParticleBench |
21:25:44 | renesac | our case inconsistency will cost some bytes on bzip compression |
21:25:55 | Araq | lol ok great |
21:26:07 | renesac | so, what is the new convention for constants again? |
21:26:14 | Araq | LikeThis |
21:26:18 | renesac | like types? |
21:26:23 | Araq | yeah |
21:26:30 | renesac | hum, ok.. |
21:26:33 | Araq | it's a typical compromise :P |
21:26:48 | Araq | everybody wants it LIKE_THIS except me |
21:26:50 | renesac | I like types to be more uniquely identifiable... but I guess it isn't easy to mix those two |
21:26:56 | vbtt | I don't LIKE_THIS |
21:27:02 | Araq | yay |
21:27:10 | renesac | I also don't like LIKE_THIS that much |
21:27:12 | vbtt | ThisIsMuchBetter |
21:27:38 | renesac | but when I don't want ALL_CAPS I want it to look like a normal variable |
21:27:47 | vbtt | amusing how much time we can spend on trivial things. |
21:27:55 | renesac | let is also kinda constant |
21:28:11 | renesac | vbtt, indeed |
21:29:08 | renesac | so we have "const Foo", "let bar", "var boo" |
21:29:11 | renesac | ? |
21:29:31 | renesac | or "let Bar"? |
21:30:06 | * | micklat quit (Remote host closed the connection) |
21:30:29 | Araq | renesac: "let bar" |
21:30:36 | renesac | ok |
21:30:44 | Araq | I was torn about constants for a long time |
21:31:05 | Araq | but OpenGl has some annoying conflicts when you don't distinguish between const and proc |
21:31:19 | renesac | humm |
21:31:37 | Araq | so that was what made the decision |
21:32:08 | Araq | "nimrod pretty" doesn't change constants btw |
21:32:10 | renesac | no chance we see conflicts again, but that time in a C++ library for example? |
21:32:19 | Araq | it doesn't matter |
21:32:25 | renesac | where THIS and This may clash? |
21:32:34 | Araq | OpenGL is important, some other C++ library is not |
21:33:40 | renesac | what could be other options for avoiding name clashes...? |
21:33:49 | renesac | another hungarian notation? |
21:41:46 | * | micklat joined #nimrod |
21:44:06 | Araq | renesac: you can put it in different modules and use module.foo |
21:44:50 | renesac | hum, right |
21:45:24 | Araq | micklat: I need to tell you that I find your project really good and it's what I have wanted to do for a long time. Do you expose the same API for both Lua and Python? |
21:45:48 | micklat | Not at the moment |
21:45:53 | micklat | great to hear |
21:46:04 | micklat | I could try harder to unify the APIs |
21:46:14 | micklat | but getting something working at all is a higher priority |
21:46:17 | Araq | I dunno if it's feasable |
21:46:29 | Araq | you can't switch "backends" easily anyway |
21:46:39 | micklat | and why would you want to? |
21:46:41 | renesac | I was going to suggest that instead of "init_list" it would be "py_list()" |
21:46:44 | Araq | they have different syntaxes and semantics and stdlibs |
21:47:25 | renesac | to be more explicit it is a foreign data structure, and not clash with possible nimrod things.. |
21:47:33 | renesac | but that is more like bike sheding |
21:47:39 | Araq | I thought "import scripting" would be nice and then your nimrod program can support plugins written in Lua or Python |
21:47:47 | micklat | renesac: I see your point |
21:47:49 | renesac | I haven't tried it yet, but I concur that it is a great project |
21:48:02 | micklat | thanks |
21:48:17 | * | carum quit (Remote host closed the connection) |
21:48:26 | micklat | Araq: not sure what you mean about "import scripting" |
21:48:38 | Araq | it's the sort of project that helps nimrod grow, we need to write articles about it and spam reddit ;-) |
21:49:07 | renesac | Araq, I think a separate python and lua scripting would be better |
21:49:10 | dom96 | I made some modifications to https://github.com/Araq/Nimrod/wiki/GSoC-2014-Ideas |
21:49:23 | renesac | you usually won't use both at the same time |
21:49:40 | Araq | micklat: I mean a common API for both, but it's not important and as I said, might not be feasable |
21:49:56 | Araq | renesac: oh you would |
21:50:16 | vbtt | fwiw, i think nimrod get's lumped with other new languages but in fact nimrod has a lot more in it to be usable (large stdlib, very full featured, large third party libs) |
21:50:23 | dom96 | Araq: Please expand the compiler section |
21:50:27 | Araq | think about plugins, let your users decide which scripting language they prefer ... |
21:50:47 | vbtt | yes we need more docs and blogs. |
21:51:14 | renesac | Araq, then all sorts of scripting languages would be imported by that import scripting? |
21:51:44 | Araq | renesac: you can do that, you can also do better than that |
21:51:51 | renesac | or 'import scripting.python" |
21:52:09 | EXetoC | reactormonk: Araq and I agreed that it would be best not to include @ in the output. I don't know if you missed that |
21:52:25 | EXetoC | but my reasoning was that it's both easier and cheaper to add it rather than removing it manually |
21:52:38 | * | foodoo quit (Quit: leaving) |
21:52:39 | renesac | I concour, the @ can be left to repr() |
21:55:52 | Araq | vbtt: any experience with kernel development? |
21:56:27 | Araq | others: same question |
21:56:57 | micklat | long ago, a bit in linux |
21:58:06 | vbtt | Araq:no, why? |
21:59:07 | reactormonk | EXetoC, I'd prefer a distinction between seq and array |
21:59:38 | Araq | vbtt: well I'm designing "regions" for pointers |
21:59:43 | vbtt | I mostly write servers in python |
21:59:49 | Araq | in fact, the design is pretty much complete |
22:00:05 | Araq | and even better the implementation is trivial :P |
22:00:17 | vbtt | that's nice. |
22:00:31 | vbtt | notwithstanding zero experience in kernels, I'm sure i'll have something to say :D |
22:01:01 | Araq | well ok, you can "tag" pointers with user-definable tags like "kernel" and "userspace" |
22:01:13 | Araq | and the type system ensures you can't mix these pointesr |
22:01:17 | Araq | *pointers |
22:01:34 | Araq | so that kernel memory can't be exposed easily to the userspace |
22:02:23 | Araq | the existing alternatives with 'distinct' etc. are all awful so a new mechanism is required |
22:02:42 | EXetoC | reactormonk: ok |
22:02:46 | vbtt | ok. what about user_pointer + delta_to_kernel_space |
22:03:31 | Araq | vbtt: you create your own `+` for that that performs the 'cast' |
22:03:55 | Araq | or do you mean you want to prevent that? |
22:04:33 | * | carum joined #nimrod |
22:05:12 | vbtt | yes, pointer math is still unsafe right? and nothing helps me from making that mistake? |
22:05:30 | vbtt | the only thing is they are two distinct pointer types? |
22:05:52 | Araq | pointer math is not builtin in nimrod |
22:06:02 | vbtt | p:UserPointer = f_returns_kernel_ptr() is a compile time error? |
22:06:12 | Araq | yup |
22:06:15 | vbtt | ah ok. |
22:06:30 | vbtt | funny i just assumed you could do pointer math. |
22:06:51 | Araq | well you can with 'cast'ing to int |
22:07:11 | Araq | but that's unsafe and very rare |
22:07:33 | * | brson quit (Ping timeout: 248 seconds) |
22:08:11 | vbtt | well the idea seems sound. |
22:08:23 | vbtt | can i add more pointer types for my user space only? |
22:08:35 | vbtt | so i dont want to mix pointers into mmap region with other pointers? |
22:08:35 | Araq | also 'ptr' will become a binary "operator", so foo ptr bar is ptr[foo, bar] |
22:08:50 | Araq | you're free in what tags you define, yes |
22:09:02 | Araq | also you can create subtype relations for them |
22:09:04 | vbtt | and can i tag strings as well? or just pointers? |
22:09:11 | Araq | just pointers for now |
22:09:14 | vbtt | ok |
22:09:38 | vbtt | i like free form tags like this to distinguish pointers. |
22:09:41 | * | skyfex joined #nimrod |
22:09:51 | Araq | I need the mechanism for "shared ptr" anyway |
22:10:01 | Araq | so I generalized it a bit |
22:10:23 | vbtt | i dont like shared ptr, btw. |
22:10:34 | Araq | what's wrong with it? |
22:11:06 | Araq | hi skyfex welcome |
22:12:07 | vbtt | for concurrency and parallelism, i find the ways that work best are messaging (copying), stm data structures or segmented data structures. |
22:12:23 | vbtt | shared ptr seems too low level, but perhaps we can implement better data structures on top? |
22:12:34 | skyfex | hi Araq, thanks! |
22:13:13 | vbtt | iow, i dont like passing an object ownership around. there should be exactly one owner throughout and other threads can possibly mutate the object with cleaner techniques (e.g. stm) |
22:13:20 | skyfex | been a while since I used IRC, but it's always a good time to get back into it |
22:13:50 | vbtt | yeah, great start with this channel too! |
22:14:18 | Araq | vbtt: shared memory is just our last resort but it's necessary for systems programming |
22:14:46 | Araq | btw we already have channels for thread communication |
22:16:20 | vbtt | Araq:ok, if it's necessary. |
22:16:27 | skyfex | I'm snooping around in the compiler source.. (it's a pleasure btw) .. why does it seem "treeToYaml" is used for anything? |
22:18:04 | skyfex | *isn't |
22:18:23 | skyfex | Can't find it beeing called from anywhere, thought it'd be interesting to try to use it |
22:19:18 | Araq | skyfex: I don't know |
22:19:40 | * | Discoloda joined #nimrod |
22:20:32 | Araq | doesn't "debug" end up using it? |
22:23:22 | Araq | skyfex: you're the first guy who thinks the compiler is a pleasure to read :-) |
22:23:36 | * | brson joined #nimrod |
22:23:51 | EXetoC | 4 overloads and 4 invocations apparently |
22:26:37 | skyfex | Well, could use some more comments some places ;) but the proc names are usually quite descriptive and are usually not too big |
22:27:33 | Araq | you can't be serious, most people think it's from hell because it uses "sem" instead of "semantic checking of" |
22:27:57 | Araq | :-) |
22:30:29 | skyfex | Is there a way of dumping the AST before the semantic check? |
22:31:05 | Araq | sure, just call renderTree or debug after the parser |
22:32:04 | Araq | main.nim, line 409 |
22:32:06 | dom96 | npm got a $2.6M investment? what. |
22:33:09 | Araq | vbtt: I'll also add 'lent' and 'unique' pointers to shut up the reddit crowd |
22:34:10 | vbtt | Araq:are unique pointers enforced? |
22:34:18 | Araq | yeah |
22:34:27 | Araq | but I think I got them wrong :P |
22:34:32 | vbtt | ok, what does lent do? |
22:34:37 | Araq | because I see no need for lifetimes |
22:35:29 | Araq | you can pass a unique pointer to a lent pointer but must not access the unique pointer for as long as the lent pointer lives |
22:36:14 | vbtt | ah i see, and this is enforceable? |
22:36:20 | Araq | sure |
22:36:37 | Araq | got all the technology for "not nil" already |
22:36:58 | Araq | in other words we have control flow dependent typing |
22:37:33 | vbtt | that i understand. i just thought lifetime was a harder problem. |
22:37:44 | Araq | yeah we won't get that |
22:37:47 | vbtt | but i guess lent pointers cant be stored in other objects.. |
22:38:07 | Araq | but as I said, I don't really understand this stuff ;-) |
22:38:36 | vbtt | heh ok. don't borrow too much from rust, btw. |
22:38:38 | vbtt | ;) |
22:39:42 | Araq | well we'll see, I plan to implement all the new pointer related stuff in one go |
22:39:47 | vbtt | ok |
22:39:56 | vbtt | i just like to see good use cases beforehand. |
22:40:06 | vbtt | specially for stuff i dont see myself using :/ |
22:40:29 | Araq | for now I see it as a marketing feature |
22:41:20 | vbtt | nimrod is already quite marketable. |
22:41:43 | Araq | no, the "rust is memory safe without a gc" is a killer argument |
22:42:01 | Araq | we need to do something about that |
22:42:13 | vbtt | unproven that the trade off is worth it. |
22:42:23 | Araq | yeah but nobody cares |
22:42:24 | vbtt | is rust as easy to program in? |
22:42:32 | vbtt | actual users care. |
22:42:44 | Araq | it doesn't matter, tbh |
22:43:05 | vbtt | golang isn't even safe and has a slow GC. |
22:43:23 | vbtt | there are plenty of awesome production apps that can be built with nimrod today. |
22:43:52 | vbtt | iow, i'd rather see nimrod do fewer things well. |
22:44:07 | vbtt | than be a jack of all trades. |
22:44:57 | skyfex | "./koch boot" seems to take some time to compile the compiler.. is there a way to make it faster? |
22:45:25 | vbtt | but i personally like gc based automatic memory management so perhaps i'm biased. |
22:46:05 | Araq | I am also thinking about a "hypersafe" pragma |
22:46:19 | Araq | it doesn't allow anything, so it can't take up CPU or memory |
22:46:36 | Araq | the only valid implementation is an empty "discard" statement for that |
22:46:38 | vbtt | so basically, an empty program? |
22:46:44 | Araq | yup. |
22:46:53 | Araq | It's very useful when you have no CPU |
22:47:39 | * | carum_ joined #nimrod |
22:48:07 | * | carum quit (Read error: Connection reset by peer) |
22:48:53 | * | carum joined #nimrod |
22:49:10 | renesac | I assume all this talk for pointers is post 0.9.4 stuff, right? |
22:49:28 | skyfex | yay, I was just saved by the "discard" feature for the first time |
22:49:40 | Araq | renesac: right |
22:50:08 | skyfex | or that is, requiring the return value to be used |
22:50:12 | renesac | a half-assed unique ptr implementation can also be a target for critics |
22:50:19 | Araq | well the hypersafe pragma is for april 1st |
22:50:44 | renesac | Araq, did't you like my idea about "Rod"? |
22:50:52 | renesac | ^^" |
22:51:17 | Araq | :D there are many april 1sts |
22:51:33 | renesac | sure |
22:51:40 | renesac | :D |
22:51:45 | Araq | skyfex: "koch temp" is faster and produces a nimrod_temp you can use for testing |
22:52:21 | * | carum_ quit (Ping timeout: 248 seconds) |
22:54:59 | Discoloda | bah, humbug on April 1st, cripples the usefullness of the internet |
23:02:09 | vbtt | sorry was away. |
23:02:27 | vbtt | "Araq: It's very useful when you have no CPU" |
23:02:40 | vbtt | ^ sounds like a perfect feature scheduled for apr 1 |
23:02:53 | vbtt | seriously, announce it on apr 1. |
23:04:12 | vbtt | agree that a half-assed unique ptr is more negative marketing than positive. |
23:04:49 | vbtt | Araq:you cant be everything to everybody - pick a story. |
23:04:50 | * | Demos joined #nimrod |
23:05:11 | vbtt | if nimrod is a 'near realtime gc language' with optional manual memory mgmt - that's a good story. |
23:06:40 | vbtt | when you also add yet another way to manage memory - it makes the story confusing. what memory management do you recommend? which should i use in my lib? will it inter-operate with all other libs? will i understand the other code out there? |
23:07:03 | Demos | why is the unique_ptr half-assed? |
23:07:03 | vbtt | or are you trying to be c++? (everybody uses 10% of the language, but a different 10%) |
23:07:41 | vbtt | Demos: it might not be. but *if* it is half-assed (it's possible there are some holes because such a unique/lent system can get quite complex to get right) |
23:08:04 | * | skyfex quit (Quit: Computer has gone to sleep.) |
23:09:57 | Demos | and imo a unique_ptr is a good candidate for some 3rd party library. Also, unique_ptrs having holes is not nessassarly a bad thing, c++'s unique_ptr has holes. All you need is a way to tell the type system that you want to give up ownership of something and I suspect that that is possible in nimrod. Rust's borrowed pointer ... thing ... strikes me as strange because I suspect (based on zero evedence) that the places where it really helps yo |
23:09:57 | Demos | u are places where a GC's pointer could be faster |
23:11:23 | Araq | vbtt: well it's nothing the stdlib should use, imho, it's just that the type system needs to support it as a library implementation doesn't cut it. but whatever |
23:11:48 | Demos | what is our definition of "cuts it" here? |
23:12:38 | Araq | Demos: be reasonably safe. |
23:12:49 | Araq | but perhaps c++ already is that, I don't know |
23:12:57 | Demos | so like c++'s unique_ptr as opposed to c++'s auto_ptr |
23:13:01 | vbtt | move semantics of the unique ptr may need language support. |
23:13:27 | Araq | no. why? overloading of '=' lets you set the source to nil |
23:13:37 | vbtt | ah ok. |
23:13:51 | vbtt | thats great. |
23:14:03 | Araq | ok, you get some shitty runtime check instead of a nice compile time check |
23:14:13 | Araq | but still not too bad |
23:14:55 | Demos | Araq, c++'s unique_ptr has no check. if you move ownership from one unique_ptr to another a dref of the first one is likely to segfault |
23:14:55 | vbtt | btw, pointer tagging is good and just unique-ptr is okay with me too. it's just lent pointer that's confusing because if it's lent why make it unique at all? |
23:15:48 | vbtt | un_ptr1 = un_ptr0; un_ptr0.x = y; <-- this doesn't error at compile time? |
23:16:40 | Demos | in c++ un_ptr1 = un_ptr0 would not compile since unique_ptr's copy constructor and copy assignment have both been deleted |
23:16:52 | Demos | you need to say un_ptr1 = std::move(un_ptr0) |
23:17:53 | Demos | std::move is usually implemented as something like static_cast<typename std::remove_reference<T>::type&&>(t) |
23:18:50 | Demos | and actually, dispite having no checks these unique_ptrs are very, very useful. In many situations the owning pointer has a much longer lifetime than any accessing pointers |
23:19:43 | vbtt | Demos:is the benefit over generational GC worth the extra complexity cost? |
23:20:31 | Demos | yes. esp since a GC that worked with c++ would probably be really slow |
23:21:04 | vbtt | so if the GC was fast would it still be useful? |
23:21:15 | Demos | maybe sometimes |
23:22:41 | vbtt | i get that a unique pointer is useful when you want to move ownership from one heap to another. but i can't think of cases where it's that useful within the same heap. it it just that it wont be gced and since refcount can at most be 1, it's easy to cleanup when the last ref is gone? |
23:23:01 | Demos | the unique ptr is not going to help you move memory around from heap to heap |
23:23:21 | Araq | yeah that's true |
23:23:32 | Araq | moving from heap to heap is *hard* |
23:23:46 | Araq | really *hard*, I thought about it for years now |
23:24:02 | Araq | fyi Rust doesn't solve it at all |
23:24:03 | vbtt | good. cos i don't want to do it anyway :) |
23:24:24 | vbtt | but going back to use case for unique ptr... Demos: can you give me a brief example? |
23:24:32 | Araq | it uses a shared heap for allocations |
23:24:51 | Araq | well ok, maybe they can optimize most allocations to a thread local allocator |
23:25:59 | Demos | sure. Lets say you have a long lived resource, maybe like some texture data in a game. When you load that up you want to allocate some memory, do somethign with it, then add it to some resource management structure. unique_ptr can handle all this, and when the resource management structure goes out of scope the memory for the texture will be deleted |
23:26:11 | vbtt | i was thinking of something like erlang binaries - allocated outside all heaps and the pointer can be passed by messaging. |
23:27:27 | vbtt | Demos:what you describe works very well without unique_ptr as well. if the resource management struct is the only reference to the object, it will be deleted when the struct is deleted. |
23:27:48 | vbtt | Demos:are you saying the advantage is avoid gc traversal for objects with well known lifetimes? |
23:27:51 | Demos | right, but that is only if you have some kind of garbage collector |
23:28:04 | vbtt | nimrod has a good gc. |
23:28:11 | Demos | right |
23:28:29 | Demos | which is why I think that the unique_ptr is not a good thing to be in nimrod's standard library |
23:28:47 | * | micklat quit (Remote host closed the connection) |
23:29:34 | Demos | that said the unique_ptr could be good in some situations where the GC is hard to deal with, interop and such |
23:29:35 | vbtt | even a refcounted ptr is probably more useful. if i want deterministic destruction and avoiding gc traversal for some objects, i want immediate refcount semantics. this is specially useful for resources (file handles) |
23:30:06 | Araq | well I'm more interested in enumerating the underlying type system mechanisms, not in unique_ptr in particular |
23:30:15 | Demos | file handles could be done with a unique_ptrish thing, usually you don't hold on to them long anyways |
23:30:22 | Demos | right |
23:30:35 | Araq | unique_ptr is only a side effect of the features I'm after |
23:30:41 | Demos | well I think the parameter constraints that are for term rewriting macros may actually be able to handle them |
23:30:43 | dom96 | Araq: Should macros.len crash when the PNimrodNode has no sons field? |
23:31:09 | Araq | dom96: no idea. what does it currenly do? |
23:31:11 | vbtt | Araq: can i / will i be able to do have immediate refcounted objects in nimrod? |
23:31:27 | dom96 | ast.nim(924) len |
23:31:27 | dom96 | Error: unhandled exception: sons is not accessible [EInvalidField] |
23:31:51 | Demos | vbtt, sure. But GC'd references are likely to almost always be faster |
23:32:01 | Araq | well ast's len surely should crash, dom96 |
23:32:24 | dom96 | Araq: It seems that the vm calls that directly. |
23:32:57 | Araq | vbtt: can't see why not. overloading of '=' and destructors enable that |
23:32:59 | dom96 | Araq: Does that mean that macros.len should crash also? |
23:33:32 | Araq | dom96: it should crash in a different way. Or produce 0. |
23:33:44 | Araq | in the compiler we have safeLen for when len is too annoying |
23:33:45 | dom96 | Araq: I think it should produce 0 |
23:33:54 | Araq | ok |
23:34:09 | vbtt | Demos: why would gced references be faster? immediate refcount releases the object immediately after the last ref is gone but gc will not. |
23:34:22 | Demos | right, you can batch up work better |
23:35:02 | Demos | also, if you want to share the pointer across threads you need the count to be atomic |
23:35:47 | dom96 | Araq: For now I can manually check the kind. Don't think a user should be expected to look up the kinds which have sons and which don't though. |
23:36:19 | Demos | for example if you have a large tree you probably don't want everything freed right when the root goes out of scope since that is a long operation |
23:37:38 | Araq | dom96: ok, I agree |
23:38:08 | Demos | it really annoys me that c++ programmers think that shared_ptr is somehow a good alternitive to a gc |
23:38:43 | dom96 | Araq: Want a bug report? |
23:39:04 | vbtt | Demos: i agree in general the gc is probably more efficient cpu and latency wise. but if i want immediate release of some object, i might want a refcounted objects. |
23:39:19 | Araq | dom96: please simply fix it |
23:39:27 | Araq | the vm should call safeLen, not len |
23:39:27 | Demos | vbtt, right, this is true |
23:39:44 | dom96 | Araq: ok. Is it ok if I do it in my newasync branch? |
23:39:49 | Araq | no |
23:39:51 | Araq | it's not |
23:40:12 | dom96 | ok |
23:43:57 | * | XAMPP_ joined #nimrod |
23:44:25 | Araq | btw nimprof is really excellent for finding memory leaks |
23:44:37 | Araq | I bet nobody uses it :P |
23:45:00 | dom96 | The last time I tried to it wasn't working. |
23:45:00 | Araq | it's a superb tool once you know it |
23:45:56 | Araq | I will add it to the list of things you must not criticize |
23:47:23 | * | XAMPP quit (Ping timeout: 260 seconds) |
23:49:06 | NimBot | Araq/Nimrod devel fa8bea6 Dominik Picheta [+0 ±1 -0]: Fixes macros.len crashing on nodes which lack the sons field. |
23:53:31 | dom96 | damn. It seems iterators aren't capturing vars properly. |
23:53:48 | dom96 | Getting a c gen error. |
23:54:27 | Araq | yay |