00:22:38 | Varriount | !seen filwit |
00:22:38 | NimBot | filwit was last seen on Sun Dec 1 06:40:41 2013 quitting with message: Quit: Leaving |
00:22:59 | BitPuffin | 13 days ago |
00:23:02 | BitPuffin | anyway |
00:23:04 | BitPuffin | night! |
00:23:07 | Varriount | Night |
00:23:11 | Varriount | !help |
00:27:25 | * | BitPuffin quit (Ping timeout: 250 seconds) |
00:30:09 | * | boydgreenfield_ joined #nimrod |
01:02:52 | * | boydgreenfield_ quit (Quit: boydgreenfield_) |
01:03:13 | * | OrionPKM quit (Remote host closed the connection) |
01:06:29 | * | boydgreenfield_ joined #nimrod |
01:18:44 | * | brson quit (Quit: Lost terminal) |
01:20:21 | * | brson joined #nimrod |
01:25:34 | * | boydgreenfield_ quit (Quit: boydgreenfield_) |
01:29:57 | * | boydgreenfield_ joined #nimrod |
01:30:44 | boydgreenfield_ | Can anyone point me to a good idiomatic/canonical example for how to set up tests for a module? |
01:32:52 | Varriount | boydgreenfield, looks at the nimrod ./tests directory |
01:33:09 | Varriount | Or, the strutils module |
01:35:15 | boydgreenfield_ | Varriount: Thanks. And what's the typical way one calls them/runs the tests (like is there a Python nosetests equivalent practice)? |
01:35:54 | boydgreenfield_ | Varriount: For context, I'm just trying to move some crummy "when isMainModule" tests into a separate file and re-organize things a bit. |
01:36:24 | boydgreenfield_ | (if appropriate) |
01:48:25 | * | DAddYE_ joined #nimrod |
01:51:55 | * | DAddYE quit (Ping timeout: 250 seconds) |
01:52:39 | * | DAddYE_ quit (Ping timeout: 252 seconds) |
01:58:22 | * | brson_ joined #nimrod |
01:58:32 | * | boydgreenfield_ quit (Quit: boydgreenfield_) |
02:02:28 | * | brson quit (Ping timeout: 260 seconds) |
02:06:06 | * | OrionPKM joined #nimrod |
02:08:46 | * | darkf joined #nimrod |
02:10:52 | * | shodan45 joined #nimrod |
02:13:59 | fowl | boydgreenfield, hey try the unittest module |
02:18:13 | fowl | boydgreenfield, heres an example https://gist.github.com/fowlmouth/7938914 |
02:18:24 | fowl | and a more lengthy example https://github.com/fowlmouth/nimlibs/blob/master/tests/test_bbtree.nim |
02:33:52 | * | brson joined #nimrod |
02:37:25 | * | brson_ quit (Ping timeout: 250 seconds) |
02:43:38 | darkf | is there a way to allocate and initialize a ptr type? like i want to alloc/initialize an sdl.PRect, can i do that without let x = alloc(sizeof(PRect)); x.x = ...; ? |
02:48:52 | * | DAddYE joined #nimrod |
02:53:20 | * | DAddYE quit (Ping timeout: 245 seconds) |
02:54:22 | shodan45 | "home of the honey badgers"? |
02:58:28 | * | boydgreenfield_ joined #nimrod |
02:59:00 | * | DAddYE joined #nimrod |
03:03:36 | * | DAddYE quit (Ping timeout: 272 seconds) |
03:06:45 | * | xenagi joined #nimrod |
03:17:56 | Varriount | darkf, why are you using a ptr? why not a ref? |
03:19:36 | Varriount | darkf, PRect is a ref, to TRect |
03:20:05 | Varriount | http://nimrod-lang.org/sdl.html#573 |
03:21:14 | darkf | Varriount: "PRect = ptr TRect" |
03:21:38 | Varriount | Sorry, I meant ptr |
03:22:09 | Varriount | Anyway, you don't need to do that sizeof() stuff, you should just be able to create it with new |
03:22:50 | darkf | doesn't new work on ref and alloc on ptr? |
03:23:59 | Varriount | Huh, so it does. |
03:24:17 | darkf | indeed |
03:24:25 | darkf | I just made a wrapper newRect() *sigh* |
03:24:38 | Varriount | Still, you don't need to use the sizeof, I'm pretty sure |
03:31:07 | * | boydgreenfield_ quit (Read error: Connection reset by peer) |
03:32:59 | Varriount | Or not. Man, I feel stupid. |
03:34:05 | fowl | proc alloc[T]: ptr T = cast[ptr T](alloc0(sizeof(T))) |
03:34:27 | fowl | then you can just do alloc[TRect]() to get a ptr trect |
03:34:52 | Varriount | darkf, listen to him, he actually knows things. |
03:35:10 | Varriount | Although, why that isn't in system, I have no idea. |
03:36:40 | * | boydgreenfield_ joined #nimrod |
03:37:36 | darkf | fowl: awesome |
03:41:24 | * | boydgreenfield_ quit (Ping timeout: 260 seconds) |
03:41:36 | fowl | darkf, i wouldnt allocate PRect though |
03:41:53 | fowl | if you're using it for srcrect/destrect, just do it on the stack |
03:42:12 | fowl | var src = TRect(x: 0, y: 0, w: 32, h: 32) |
03:42:13 | darkf | fowl: can I take a reference ptr to something on the stack? |
03:42:30 | fowl | blit(surf, dest, addr src, addr src) |
03:42:55 | darkf | nice |
03:42:57 | fowl | darkf, yes with addr keyword |
03:43:03 | darkf | thanks fowl |
03:49:44 | fowl | good night all |
03:50:58 | * | DAddYE joined #nimrod |
03:55:25 | * | DAddYE quit (Ping timeout: 245 seconds) |
03:57:20 | darkf | gn fowl |
04:53:58 | * | xenagi quit (Quit: Leaving) |
05:15:18 | Varriount | Araq, any particular reason that types are spread out all over os.nim, and not at the top? |
05:23:12 | * | boydgreenfield_ joined #nimrod |
05:23:17 | * | boydgreenfield_ quit (Client Quit) |
05:34:56 | shodan45 | anyone ever try to nimrod-ify Qt? |
05:35:44 | * | brson quit (Quit: leaving) |
05:54:41 | * | DAddYE joined #nimrod |
05:59:31 | * | DAddYE quit (Ping timeout: 265 seconds) |
06:56:12 | * | DAddYE joined #nimrod |
07:00:39 | * | DAddYE quit (Ping timeout: 260 seconds) |
07:22:52 | * | DAddYE joined #nimrod |
07:23:09 | * | DAddYE quit (Remote host closed the connection) |
07:23:15 | * | DAddYE joined #nimrod |
07:42:14 | * | ics quit (Ping timeout: 240 seconds) |
07:45:40 | * | ics joined #nimrod |
08:51:33 | * | DAddYE quit (Remote host closed the connection) |
08:52:01 | * | DAddYE joined #nimrod |
08:56:53 | * | DAddYE quit (Ping timeout: 265 seconds) |
09:09:20 | Araq | Varriount: I think they are grouped into some logical sections |
09:13:43 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:39:25 | * | CarpNet joined #nimrod |
09:52:34 | * | DAddYE joined #nimrod |
09:56:48 | * | DAddYE quit (Ping timeout: 246 seconds) |
10:54:34 | * | DAddYE joined #nimrod |
10:57:09 | * | HipsterPuffin joined #nimrod |
10:58:45 | * | DAddYE quit (Ping timeout: 245 seconds) |
11:46:26 | * | fundamental quit (Ping timeout: 264 seconds) |
11:55:52 | * | DAddYE joined #nimrod |
11:55:54 | HipsterPuffin | dom96: I did some research on the cookie thing before I slept |
11:56:09 | HipsterPuffin | dom96: we can discuss it in the VNUG later :P |
11:59:41 | * | fundamental joined #nimrod |
12:00:00 | * | DAddYE quit (Ping timeout: 245 seconds) |
12:52:39 | Araq | shodan45: c2nim got c++ support, so you can try to wrap Qt ... |
12:57:16 | * | DAddYE joined #nimrod |
12:58:43 | HipsterPuffin | He can try |
13:01:40 | * | DAddYE quit (Ping timeout: 245 seconds) |
13:13:40 | * | gradha joined #nimrod |
13:14:32 | * | zahary_ joined #nimrod |
13:14:34 | * | isenmann quit (Quit: Leaving.) |
13:58:32 | * | DAddYE joined #nimrod |
14:00:06 | * | darkf quit (Quit: Leaving) |
14:02:57 | * | DAddYE quit (Ping timeout: 250 seconds) |
14:29:41 | dom96 | HipsterPuffin: y u so hipster? |
14:34:31 | HipsterPuffin | dom96: cuz I am sitting at a mac lol |
14:34:50 | HipsterPuffin | doing iOS dev |
14:35:24 | dom96 | so hipster |
14:35:31 | HipsterPuffin | ultrahipster |
14:35:38 | dom96 | uberhipster |
14:35:47 | HipsterPuffin | I will now lose my password if I start using the forum |
14:35:58 | HipsterPuffin | cuz starbax errday |
14:38:28 | dom96 | lol |
14:38:40 | dom96 | yeah, i'm sure starbucks is filled with hackers |
14:38:51 | gradha | hipster hackers |
14:42:35 | HipsterPuffin | yup only hipster hackers |
14:46:26 | * | faassen joined #nimrod |
14:47:38 | dom96 | HipsterPuffin: When can we VNUG? |
14:47:53 | HipsterPuffin | dom96: when I get home :P |
14:48:02 | dom96 | HipsterPuffin: When will that be? |
14:48:06 | HipsterPuffin | hmm |
14:48:11 | HipsterPuffin | depends on how fast I read |
14:48:44 | faassen | noob question about assignment |
14:48:58 | HipsterPuffin | but I would say I'll leave in ~3 hours or so? |
14:49:13 | HipsterPuffin | dom96: isn't there someone else you can VNUG with until then? :D |
14:49:35 | faassen | if I have a nested array with a tuple inside, and I write a proc with an argument that takes this as a parameter.. how can I modify the fields in the tuple in that proc? |
14:49:40 | dom96 | HipsterPuffin: It's ok, I can wait. |
14:49:40 | faassen | it tells me it cannot assign. |
14:49:49 | faassen | when I'm not doing nesting I can use 'var' in the proc definition |
14:49:53 | faassen | but how would I do 'var' for a nested structure? |
14:50:05 | HipsterPuffin | dom96: but it is important that more people become VNUGgets! |
14:50:16 | HipsterPuffin | faassen: jump into the VNUG and dom96 will help you! |
14:50:33 | faassen | it would be good if I knew what a VNUG is. |
14:50:34 | EXetoC | faassen: var is recursive |
14:50:43 | EXetoC | so passing by var should be enough |
14:50:45 | HipsterPuffin | faassen: it's in the irc topic |
14:51:04 | HipsterPuffin | EXetoC: you should VNUG |
14:51:13 | faassen | ah, well, what does VNUG stand for? |
14:51:24 | dom96 | Virtual Nimrod User's Group |
14:51:32 | faassen | okay, well, can I get help on IRC too? :) |
14:51:43 | HipsterPuffin | dom96: you were quicker than me. Damn this hipster keyboard |
14:51:45 | Araq | faassen: yes of course |
14:51:49 | faassen | okay, very good. :) |
14:51:55 | faassen | I figure they were having VNUG in their head. |
14:51:58 | Araq | and it's still the preferred method |
14:52:07 | dom96 | Yeah. I think HipsterPuffin is trying to recruit people a bit too much :P |
14:52:13 | HipsterPuffin | :( |
14:52:23 | faassen | yeah, I figure that's what was going on, and it's okay, I understand HipsterPuffin |
14:52:27 | faassen | okay var is recursive.. |
14:52:33 | faassen | but I tried that. let me try again. |
14:52:39 | HipsterPuffin | Wouldn't really forum be the preferred method because it's (hopefully) searchable |
14:52:44 | faassen | oh wait, I even got rid of the argument altogether. |
14:52:51 | faassen | I tried creating my nested structure on the stack and then on the heap with new |
14:52:53 | dom96 | HipsterPuffin: Yeah, but IRC is real time. |
14:52:55 | faassen | but still no luck. |
14:53:01 | HipsterPuffin | dom96: unlike VNUG? |
14:53:09 | dom96 | no, unlike the forum |
14:53:25 | faassen | I want to be able to ask follow up questions real quick. :) |
14:53:34 | HipsterPuffin | in the VNUG there is less misunderstandings, and you go forward much faster than irc even |
14:53:40 | OrionPKM | hey dom96 how is the json module able to use {}'s, i.e. %{ "something: %"else" } |
14:54:03 | faassen | I can access the field, my loop is correct, I can echo things. |
14:54:30 | Araq | OrionPKM: by taking an openarray |
14:54:47 | Araq | {key: val} is just sugar for [(key, val)] |
14:54:49 | faassen | what is your preferred pastebin? |
14:54:50 | dom96 | OrionPKM: The compiler transforms %{ "something: %"else" } into a openarray[tuple[key: string, val: PJsonNode]] |
14:55:05 | dom96 | faassen: gist |
14:55:10 | Araq | and yes, that's documented :P |
14:55:13 | OrionPKM | interesting.. im trying that and it's not working so well |
14:55:16 | dom96 | It's got Nimrod syntax highlighting |
14:55:22 | HipsterPuffin | I think the only reason IRC wins over VNUG at the moment is because there is more people in irc. Which is what I'm trying to fix :P |
14:55:37 | Araq | HipsterPuffin: you have no idea |
14:55:55 | Araq | it's really loud in here all the time |
14:56:02 | OrionPKM | I get 'undeclared identifier {}' |
14:56:27 | HipsterPuffin | Also VNUG is a great tool to help people in irc even. Because the people trying to help could discuss the issue in the VNUG and help the irc noob in irc |
14:57:15 | Araq | yeah because different channels for IRC don't exist |
14:58:04 | HipsterPuffin | Araq: did I say that? No. Just that when you are actually talking to each other it's faster and there is less misunderstandings |
14:58:07 | faassen | https://gist.github.com/faassen/7945477 |
14:58:19 | faassen | not sure how to do syntax highlighting. |
14:58:31 | dom96 | HipsterPuffin: I think for most people it's easier to communicate via text |
14:58:37 | dom96 | especially about programming |
14:58:49 | faassen | yeah, there's a benefit to text when talking about programming. also it's less noisy. |
14:58:53 | dom96 | VNUG should be just a fun hang out place for hardcore nimrod users |
14:58:58 | HipsterPuffin | dom96: well it's easier to write something out |
14:59:04 | HipsterPuffin | but I don't see how you couldn't do both |
14:59:05 | faassen | anyway, here's my gist. why does 'field.height' not work? |
14:59:50 | HipsterPuffin | like in vnug "I have this problem on this line and it looks like this" *pastes text* "at the place where it says bla I'm getting this error blabla" |
14:59:59 | * | DAddYE joined #nimrod |
15:00:09 | faassen | maybe I should just join vnug just to keep HipsterPuffin focused here. :) |
15:00:25 | Araq | faassen: your problem is that the items iterator returns a read-only view |
15:00:30 | faassen | ahah. |
15:00:34 | HipsterPuffin | I'm not in the VNUG atm, I'll be there when I get home hehe :D |
15:00:53 | Araq | there is an mitems iterator for a mutable view but not yet in system |
15:01:10 | faassen | Araq: so what's the normal pattern to do this? am I doing something unusual? |
15:01:13 | Araq | it only exists for tables and more advanced collections |
15:01:27 | Araq | the normal pattern for now is to use an old-school index |
15:01:34 | faassen | ahah. |
15:01:42 | faassen | I usually use Python, so I expected this to work. |
15:01:52 | faassen | and it almost does as I can *view* the values. |
15:02:23 | Araq | well python works very differently |
15:02:27 | faassen | I know. |
15:02:39 | Araq | it would work the same if you use 'ref TField' |
15:02:51 | faassen | in the TRow definition, right? |
15:02:58 | Araq | right |
15:03:07 | Araq | but that's a stupid idea for performance |
15:03:07 | faassen | and then I wouldn't get a read-only view as only the reference would be read-only? |
15:03:14 | Araq | exactly |
15:03:32 | faassen | yeah, I figured I'd want everything non-reference for performance. |
15:03:58 | faassen | what's the reason behind it being a read-only view? |
15:04:29 | * | DAddYE quit (Ping timeout: 250 seconds) |
15:04:36 | faassen | I mentioned Python because the Nimrod syntax leads one to believe such a pattern works, and once I noticed the for-loop worked for reading I thought, okay, why not writing? |
15:04:52 | Araq | people love immutability these days |
15:05:19 | Araq | maybe the default should be the 'mitems' iterator, I'm not sure |
15:05:21 | faassen | does it let the compiler optimze some more? |
15:05:37 | gradha | faassen: IIRC depending on python version and what you are iterating, python's for will allow modification but it won't "happen", because it's being done on a copy, which is more confusing |
15:06:08 | faassen | heh, well, Nimrod has mutable strings and tuples (which is odd coming from Python as those are the main immutable things).. so this whole immutability love is a bit mixed. |
15:06:45 | faassen | gradha: hm, well, perhaps you're talking about modifying the array itself, otherwise I don't know what you're talking about. |
15:06:55 | faassen | gradha: I was talking about modifying items in the array. |
15:07:51 | OrionPKM | so dom96, proc `%`*(elements: openArray[PJSonNode]): PJsonNode overload doesnt ever get called? |
15:08:06 | OrionPKM | unless you explicitly use `%`(args) |
15:09:15 | dom96 | Yes, unless you write %{...} |
15:09:34 | OrionPKM | but %{} is expecting key:value |
15:10:10 | Araq | try %{:} |
15:10:12 | dom96 | oh no. That must be the overload for JsonArray |
15:10:23 | OrionPKM | it is |
15:11:11 | Araq | faassen: in general eliminating copies is easier than eliminating aliasing, so immutability tends to be good for an optimizer |
15:11:36 | Araq | but it's much more complex than that |
15:11:47 | OrionPKM | araq pass no items? |
15:12:19 | OrionPKM | so dom96 the JArray constructor has to be `%`(args) ? |
15:12:56 | dom96 | Dunno. Maybe %[...] works? |
15:13:01 | faassen | so the best way to loop through indexes in an array is 'for i in low(array) .. high(array)'? or is there a helper that gives me the indexes? I only find items and pairs. |
15:13:16 | faassen | and this seems to be a bit verbose, repeating what I loop through in low() and high() |
15:13:40 | faassen | I could use pairs but then it gets a bit confusing, indexes for writing and item for reading? |
15:14:21 | OrionPKM | hmm actually that does work dom |
15:15:57 | gradha | faassen: low(array) will most likely be zero, but it's either that or 0..len(x)-1 |
15:16:12 | faassen | gradha: true, that gets rid of some repetition. |
15:16:52 | faassen | I guess I can define my own indexes iterator. :) |
15:18:29 | HipsterPuffin | Araq: maybe we should switch to NSString and NSMutableString |
15:23:24 | faassen | funny, I have to ask for help when I want to modify values in a for loop, but writing a generic iterator proc that yields array indexes was easy. :) |
15:27:20 | gradha | I don't understand how the subexes module has a format for $named when no procs accept table like params |
15:28:07 | faassen | Araq: this immutable view thing in items. is this documented somewhere? |
15:29:42 | faassen | going to wake up toddler from nap, so I will be intermittently or not-here soon. :) |
15:30:21 | Araq | it's not documented but it's also quite obvious from the type signature |
15:30:32 | Araq | it return a 'T' and not a 'var T' |
15:30:58 | Araq | but surely it's a gotcha, especially when coming from python |
15:31:10 | Araq | we need a "Nimrod for Python programmers" tutorial |
15:31:32 | faassen | ah, okay, right, I am not used to the 'var' thing yet. |
15:31:35 | faassen | in return values. |
15:31:38 | faassen | got to think about that. |
15:32:19 | faassen | anyway, got to go now. |
15:32:21 | faassen | thanks! |
15:32:26 | * | faassen waves. |
15:32:28 | Araq | you're welcome |
15:32:35 | * | faassen quit (Quit: faassen) |
15:33:23 | Araq | gradha: well subexes is a weird rarely used module |
15:33:39 | gradha | no worries, looked at the source |
15:34:13 | gradha | does parsecfg lack a loadConfig() to avoid depending on the tables module or similar? |
15:34:43 | Araq | in general I don't like tables |
15:34:52 | Araq | and use them only when really necessary |
15:35:11 | gradha | what do you use to store config files? |
15:35:25 | Araq | I don't store config files |
15:35:34 | Araq | I read them and process them |
15:35:51 | Araq | and set some globals that contain what I can't use immediately |
15:36:12 | Araq | so I have someGlobal instead of config["someGlobal"] |
15:36:51 | Araq | that works much better anyway since then I can use the type system |
15:36:59 | OrionPKM | what are the rules for proc names that can be used with that {} syntax? |
15:37:01 | Araq | instead of dealing with strings everywhere |
15:37:10 | OrionPKM | seems like !@#$% etc can be used |
15:37:27 | OrionPKM | but not letters |
15:37:33 | Araq | OrionPKM: there is nothing special going on here |
15:37:44 | Araq | it's <operator> <curlies> |
15:38:11 | Araq | and an operator can't consist of letters unless it's some keyword operator |
15:38:50 | OrionPKM | why |
15:38:57 | Araq | because |
15:39:24 | OrionPKM | ah, that makes sense :p |
15:39:55 | Araq | well read the grammar and then you'll know |
15:42:49 | Araq | +4, +(1, 2) vs foo(4), foo(1, 2) |
15:43:11 | Araq | note how +(1, 2) passes a tuple to the + |
15:43:23 | Araq | but foo(1, 2) doesn't pass a tuple to foo |
15:43:36 | OrionPKM | I would have thought it would depend on how foo was declared |
15:43:41 | OrionPKM | proc foo vs. proc `foo` |
15:43:51 | Araq | the grammar doesn't rely on symbol lookup |
15:44:06 | Araq | so how things are declared is irrelevant |
15:44:33 | OrionPKM | got it |
15:44:51 | OrionPKM | what about symbol prefixes to "foo" |
15:44:56 | OrionPKM | e.g. `%foo` |
15:45:07 | OrionPKM | cant that be treated as an operator |
15:47:28 | Araq | no that's operator and then an identifier |
15:47:44 | Araq | oh you mean with the backticks? |
15:47:59 | Araq | well backticks mean to parse it like an ordinary identifier |
15:48:17 | Araq | so `+`(1, 2) # doesn't pass a tuple to + |
15:48:27 | OrionPKM | hm |
15:49:12 | OrionPKM | I didnt mean calling with backticks |
15:49:43 | Araq | well I answered every possible interpretation of your question :P |
15:49:47 | OrionPKM | lol |
15:50:12 | OrionPKM | Im not asking what's possible now, I'm asking about minimal modifications to parsing |
15:50:16 | OrionPKM | what I want is something like %tagname {..children.. } |
15:50:40 | OrionPKM | treat `%tagname` as one identifier if tagname isn't otherwise recognized |
15:51:14 | * | brihat joined #nimrod |
15:54:13 | Araq | you can hack it with a template/macro `%` that checks it got "tagname" as an identifier |
15:54:34 | Araq | but I wonder why you want that |
15:54:47 | OrionPKM | I want to write a better html gen library |
15:54:58 | Araq | ha |
15:55:02 | Araq | impossible |
15:55:04 | OrionPKM | since the one we have is a joke |
15:55:15 | Araq | -.- |
15:55:20 | OrionPKM | it's way overly restrictive :P |
15:55:38 | Araq | well what we have is used already |
15:55:44 | Araq | and people tend to like it |
15:56:06 | OrionPKM | there are a lot of problems with it |
15:56:37 | Araq | well in my slides I should how to do it completely different |
15:56:43 | Araq | *I show |
15:57:04 | OrionPKM | the reqAttr stuff shouldn't even exist imo |
15:57:11 | OrionPKM | <script> doesnt require a type |
15:57:27 | OrionPKM | leave it to the client to tell you if it's a bad tag |
15:59:10 | Araq | well that's what the html spec used to say |
15:59:23 | Araq | not sure if that changed |
15:59:31 | Araq | html keeps changing |
15:59:34 | OrionPKM | lol |
15:59:50 | Araq | so sure, lets have no validation |
16:00:10 | Araq | that doesn't mean we need to change the fucking language definition to get a better htmlgen module |
16:01:00 | OrionPKM | guess not |
16:01:14 | * | DAddYE joined #nimrod |
16:02:04 | OrionPKM | I think it'd be nice if the HTML generator was more like the json generator, where it actually builds up a tree of nodes |
16:02:24 | Araq | yeah it would be nice |
16:02:41 | gradha | OrionPKM: thanks for volunteering |
16:02:54 | OrionPKM | that way you can do 'pretty' output vs minified etc more easily |
16:02:54 | Araq | but since the compiler performs no deforestation it would also be much more inefficient |
16:03:06 | EXetoC | more syntax!!! |
16:03:36 | Araq | we have that already btw |
16:03:47 | Araq | it's some macro in the xmltree module |
16:04:02 | Araq | and works for every kind of xml including html |
16:04:06 | OrionPKM | cool |
16:05:07 | Araq | gradha: btw does -d:useFFI work for you? |
16:05:23 | gradha | haven't tried it yet |
16:05:25 | * | DAddYE quit (Ping timeout: 245 seconds) |
16:05:44 | Araq | my bet: libFFI doesn't work on mac |
16:05:55 | gradha | doesn't zahary_ know? |
16:06:13 | Araq | or requires some stupid libfffi.fu.version.so.dylib instead |
16:06:21 | zahary_ | I haven't tried it |
16:06:27 | gradha | I'm sure it require downloading something from the appstore |
16:06:52 | Araq | lol |
16:08:26 | zahary_ | it's called libffi.dylib and apparently ships with mac os |
16:08:47 | gradha | awww... fu.version sounded so much more interesting |
16:09:52 | * | boydgreenfield quit (Quit: boydgreenfield) |
16:10:09 | HipsterPuffin | I actually kind of like that obj-c makes you type more when you want a mutable version of a collection or value |
16:10:31 | HipsterPuffin | not because mutability should be avoided at any cause but just so that you think about i |
16:10:33 | HipsterPuffin | tt |
16:10:47 | HipsterPuffin | hey zahary_! |
16:11:13 | gradha | HipsterPuffin: how do you like mandaatory named parameters for each call |
16:11:40 | Araq | NSMutableString is a subclass of NSString iirc, which means the subclass breaks the basic invariants of the superclass |
16:11:57 | Araq | so yeah. great design. |
16:12:01 | HipsterPuffin | gradha: honestly considering I noticed yesterday that I had accidentally passed parameters in the wrong order to my own procs I wouldn't mind |
16:12:17 | HipsterPuffin | Araq: yeah it's a subclass |
16:12:20 | gradha | HipsterPuffin: well, that happens a lot in a language with disregard for types |
16:12:21 | EXetoC | string hierarchies. awesome |
16:12:31 | HipsterPuffin | gradha: it was in nimrod |
16:12:45 | gradha | HipsterPuffin: stop using strings all over the place then |
16:12:54 | HipsterPuffin | gradha: well it was sqlite code |
16:13:01 | Araq | HipsterPuffin: use foo(param1=a, param2=b) then :P |
16:13:04 | HipsterPuffin | no point in coverting to int and back for ids etc |
16:13:08 | HipsterPuffin | Araq: yeah |
16:13:33 | Araq | nimrod supports named parameters and hey, sometimes even I use them |
16:13:37 | HipsterPuffin | Araq: for the record I didn't say that objc has amazing design or anything |
16:14:24 | gradha | if you were in the VNUG you would have heard the laughter |
16:14:54 | HipsterPuffin | gradha: but you are never in the VNUG :P |
16:15:08 | gradha | come on HipsterPuffin, join the VNUG! You'll never know if I'm there unless you come! |
16:15:23 | HipsterPuffin | gradha: I will when I get home damn it! |
16:16:54 | Araq | HipsterPuffin: my jump optimizer doesn't NEED mutable state, but it's kind of nice to my users if it uses less RAM and doesn't copy the bytecode around pointlessly |
16:17:27 | EXetoC | Thank god for the ability to specify parameter names at the call site. I went crazy with default arguments in nim-glfw for this reason :> |
16:17:49 | HipsterPuffin | Araq: well sure but a decent optimizer can remove those pointless copies pretty easily right? |
16:17:51 | gradha | Araq: talking about types, shouldn't rstgen export the PDoc alias? I think I've seen other semi-public types, used in signatures but not immediately available from the generated docs |
16:17:52 | * | zielmicha joined #nimrod |
16:18:09 | Araq | HipsterPuffin: not any "decent" optimizers I'm aware of |
16:18:23 | gradha | Araq: I guess it could be a bother since the compiler also defines it's own PDoc |
16:19:07 | HipsterPuffin | Araq: didn't you like make the argument a few minutes ago that immutability sometimes makes optimizing easier even |
16:19:25 | Araq | HipsterPuffin: yes. but I also said it's more complex than that |
16:19:51 | Araq | you hit the "more complex than that" scenario |
16:20:06 | HipsterPuffin | yeah |
16:21:39 | HipsterPuffin | well like I immediately added to my comment in order to prevent this impression that you got anyways. I don't think mutability should be avoided like the plague |
16:21:58 | HipsterPuffin | just that if you don't get any real benefits from it it's cleaner to stay away |
16:22:37 | Araq | you immediately get efficiency though :P |
16:23:04 | HipsterPuffin | not always |
16:23:06 | Araq | unless you start to use multi-threading |
16:23:13 | Araq | then the fun begins |
16:23:20 | HipsterPuffin | exactly |
16:23:41 | Araq | gradha: PDoc is a simple alias for my typing pleasure |
16:23:48 | HipsterPuffin | so yeah, if it give efficiency without ridiculous amounts of sweat, blood, and tears I am all for it |
16:24:09 | HipsterPuffin | so I don't know what you are on about trying to convince me when I already agree lol |
16:24:41 | gradha | Araq: it's also an undocumented nightmare for people new to the module who are forced to look at the source |
16:25:00 | Araq | replace it with it's "body" then instead |
16:25:05 | Araq | *its |
16:26:12 | HipsterPuffin | lol NSNull |
16:26:13 | Araq | using P for a 'var' type is uncommon anyway |
16:26:19 | HipsterPuffin | great job on that one |
16:26:22 | * | ddl_smurf joined #nimrod |
16:26:33 | Araq | ddl_smurf is back! |
16:26:38 | ddl_smurf | heya |
16:26:40 | Araq | after all those years ... |
16:26:50 | ddl_smurf | lol don't get misty eyed =D |
16:26:55 | Araq | fed up with JS? |
16:27:04 | ddl_smurf | ha, NEVER |
16:27:19 | ddl_smurf | fed up with GC requirement ? |
16:27:38 | ddl_smurf | cheez 50 people, congrats on nimrod's growth dude |
16:27:40 | HipsterPuffin | fed up with food? |
16:27:44 | * | brson joined #nimrod |
16:28:04 | Araq | fed up with GC-related corruptions for sure |
16:29:05 | Araq | thanks for the congrats |
16:29:08 | ddl_smurf | how the **€! did you know I was working on JS most of this time ? |
16:29:17 | ddl_smurf | was I drunk again ? |
16:29:56 | Araq | well you said JS is your favourite language :P |
16:30:13 | HipsterPuffin | gtg! |
16:30:15 | ddl_smurf | yeah… hell I even like gorillascript |
16:30:21 | * | HipsterPuffin quit (Quit: Page closed) |
16:30:22 | Araq | and thanks to Google you can now use it for everything |
16:30:26 | * | Demos joined #nimrod |
16:30:49 | ddl_smurf | that's true, also node's fault, but still, good JS is hard to come by |
16:31:13 | ddl_smurf | these kids these days, they have 1 function-sized libraries for everything |
16:31:39 | dom96 | it's been a long time ddl_smurf, welcome back |
16:31:49 | ddl_smurf | hey dom |
16:32:06 | ddl_smurf | can't find a language to really invest in, want optional GC and zero cost iterators and macros |
16:32:18 | Demos | wait I thought that in js is was common to package your whole lib as one function to sever as a module and namespace |
16:32:26 | Varriount | Any reason removeDir uses walkDir, instead of walkDirRec? |
16:32:43 | Araq | usually the reason is efficiency, Varriount |
16:32:54 | Araq | of course we never even measure it |
16:33:32 | Varriount | Araq, the removeDir uses recursion along with walkDir, which is probably less efficient than a loop of walkDirRec |
16:33:53 | ddl_smurf | (my 2cents: there's a very good reason for a rmdir that doesn't work if the folder isn't empty - to use FS "global" lock) |
16:34:13 | Araq | nah, recursion kicks ass |
16:34:33 | Varriount | Araq, stack overflow... |
16:34:52 | Demos | I was thinking maybe wierd situations where you have simlinks and you end up trying to follow a dangleing symlink |
16:34:53 | Demos | or not |
16:35:18 | Varriount | And I've looked at the generated C, and the recursion isn't optimized away. |
16:35:33 | Araq | nor does it need to be |
16:35:44 | Araq | the cpu is quite good at it |
16:35:58 | Demos | I think every C compiler worth its salt will to TCO (and GCC can do even more) |
16:36:11 | Demos | recursion can be a bad thing when you have to like traverse a 4GB tree |
16:36:43 | Varriount | Araq, imagine trying to delete a bunch of minecraft maps. |
16:37:02 | * | linkmauve1 quit (*.net *.split) |
16:37:11 | * | q66 quit (Remote host closed the connection) |
16:37:13 | Varriount | (I'm assuming minecraft still uses that wierd folder based chunk storage system) |
16:37:15 | EXetoC | I'm thinking of making a freetype2 wrapper in C, and then bind that, simply because it seems like a less painful approach. |
16:37:32 | * | q66 joined #nimrod |
16:38:03 | ddl_smurf | (my question was semi serious though, does the runtime still leak without a GC ?) |
16:38:45 | ddl_smurf | EXetoC: why not add nimrod support to SWIG ? =D |
16:38:56 | Demos | I know you can set the GC to use ref-counting, which is "not GC" if you listen to the average C++ dev, and I think the entire GC gets eliminated if you do not use it |
16:39:24 | Araq | ddl_smurf: sure it leaks, it's got realtime capabilities so why bother? |
16:39:26 | EXetoC | ddl_smurf: isn't it similar to c2nim? which is a great tool, but some libs are just huge and/or messy |
16:39:35 | ddl_smurf | afaik only worse c++ dev listen to the average c++ dev |
16:39:39 | Demos | actually I hear the entire GC is implemented as a library, but I am unsure of that |
16:40:07 | Araq | it's not like you want to use nimrod's xml module in a kernel anyway |
16:40:28 | ddl_smurf | EXetoC: yeah it is, but it automates writing wrappers for quite a few languages |
16:40:42 | Demos | there are things that are faster with gc (probably graph stuff, in particular cyclic graphs) |
16:41:01 | Araq | ddl_smurf: we have c2nim instead of swig |
16:41:02 | * | q66 quit (Client Quit) |
16:41:12 | Demos | I think SWIG is a HUGE undertaking, nimrod is fast enought that it is not so worth it |
16:41:22 | ddl_smurf | Demos: sure, actually most things are faster with GC iirc, but still, i have a psychological problem with GCs =D |
16:41:44 | Araq | said the JS developer |
16:41:58 | Araq | ;-) |
16:42:07 | ddl_smurf | you can work around it if you really want to =) |
16:42:21 | Araq | oh really? well so can you in nim |
16:42:37 | Demos | I think if you are using "unique_ptrs" than manual management may be faster, unless you really need wierd ownership |
16:42:39 | Araq | Demos: the GC is implemented in Nimrod but that doesn't make it a library |
16:42:44 | ddl_smurf | pass a native array around, make sure you don't create a closure, use the array as the whole system memory, a la asm.js |
16:43:00 | ddl_smurf | but anyway, i don't do server JS, that's where i'm more concerned about ram |
16:43:16 | * | capisce quit (Write error: Broken pipe) |
16:43:32 | Demos | nimrod's GC is really, really, really fast. |
16:43:43 | Demos | not thread safe though |
16:43:56 | Varriount | Erm, mostly thread safe, I thought |
16:44:09 | Demos | well not thread safe in the sense that you can not use it for stuff shared between threads |
16:44:25 | * | dymk quit (Ping timeout: 338 seconds) |
16:44:33 | ddl_smurf | araq: what's your take on rust type ownership model ? |
16:44:43 | * | q66 joined #nimrod |
16:45:44 | Araq | ddl_smurf: I think it's somewhat misguided |
16:46:10 | Araq | for reasons I will explain later, perhaps |
16:46:19 | Demos | I can give you /my/ take |
16:46:21 | ddl_smurf | your purity system ? |
16:46:33 | ddl_smurf | sure |
16:46:40 | Demos | but I know little about lang design, still here goes |
16:46:42 | * | dymk joined #nimrod |
16:47:10 | Araq | ddl_smurf: in reality I'm waiting and if they have a really nice and sweet solution, I'll copy it :P |
16:47:14 | Varriount | I'm just happy to have a compiled language that doesn't require semicolons on every line, or excessive use of braces. |
16:48:00 | ddl_smurf | i don't think its sweet, its horrible to use, but i kinda don't see a better way to accomplish it, very much looking for alternatives |
16:48:02 | Demos | I think rusts ownership "stuff" expends a ton of effort on solving a problem that is not relevant for many people because of the garentees of functions in a data race free program and for situations where there are no races could increase the number of programs that fail to typecheck and are correct |
16:48:17 | Demos | tl;dr feature has a low thrust/weight |
16:49:05 | * | capisce joined #nimrod |
16:49:06 | ddl_smurf | the way i see it it's more about the interaction between refcounted/gc and threading than only race conditions though, spiky problem that |
16:49:37 | Demos | yeah, I kinda like nimrod's solution that says "don't share memory" and "if you really need to share memory you are on your own" |
16:49:51 | Demos | as a bonus I think that this speeds up the gc in the common case |
16:50:13 | Demos | and in the case where you need to share memory you already care about perf and you may want to manually manage memory anyways |
16:50:54 | ddl_smurf | not much point in threading if you don't share something.... |
16:51:11 | Demos | well you share immutable data and send messages |
16:51:21 | ddl_smurf | that's kinda what process isolation is for no ? |
16:51:41 | Demos | if you are sharing writeable data and having two threads cooperate to build a structure it is hard no matter what |
16:51:48 | Demos | and memory management is small peas |
16:51:52 | Demos | at that point |
16:53:05 | ddl_smurf | i dunno, there are some nice models (like disruptor) that do most of the heavy lifting in that regard |
16:55:35 | gradha | Araq: I have Objc code which calls nimrod, and expects a cstring returned, how does that work with the GC, do I need to keep a global on the nimrod side so the return value doesn't get released? |
16:55:36 | Demos | that seems like /almost/ just message passing, but the homepage does not really say wtf disruptor /is/ |
16:56:54 | ddl_smurf | it is, each thread takes then surrender ownership, the disruptor thing is just a collection of threads that synchronises all the workers without locks |
16:57:16 | Demos | gradha, if the string that the cstring comes from is a ref you can call gc_ref (I think) on it to pin it, and gc_unref to unpin it, then use objective-cs memory management tools to call those setup and delete functions, there may be something better to do with cstrings though |
16:57:17 | ddl_smurf | (so there is no actual ownership of messages) |
16:57:26 | Araq | gah, I have to leave, interesting discussion |
16:57:29 | Araq | bbl |
16:58:02 | Varriount | gradha, if the Objc code releases what it is given, I think you need to allocate an untraced reference of the cstring |
16:58:04 | gradha | Demos: yes, that's an alternative to a global |
16:58:19 | Demos | yeah that is a good idea ddl_smurf and one could do that in nimrod, my point was that you either want something like that, or you are writing extremely difficult code that you will be doing manual memory management anyways |
16:58:23 | ddl_smurf | gradha: you can also just copy the cstring to a nsstring, which will spare you a lot of pain (and the perf impact is probably tolerable) |
16:58:37 | Varriount | nsstring? |
16:58:47 | gradha | ddl_smurf: sure, but, by the time the nimrod code *returns*, aren't their variables already volatilized? |
16:58:57 | ddl_smurf | sorry, i assumed mac |
16:59:14 | * | boydgreenfield joined #nimrod |
16:59:51 | Varriount | Is there any way to use an expression var in a regular proc? |
16:59:54 | ddl_smurf | your objc is calling nimrod that is returning a string ? |
17:00:13 | Varriount | Something like "let x = v, z" |
17:00:31 | gradha | ddl_smurf: yes, exposed as a C function call, which would return a char* |
17:01:10 | ddl_smurf | you should probably reverse that and have nimrod call you with the string as parameter, that way nimrod knows about the scope |
17:01:46 | ddl_smurf | (this kind of stuff is the whole point of SWIG) |
17:01:59 | ddl_smurf | Varriount: i don't understand what let x = v, z should do |
17:02:11 | gradha | ddl_smurf: I'm implementing the SWIG, so to speak |
17:02:48 | Demos | the GC may treat strings and cstrings specially to make just returning the cstring more or less OK |
17:04:29 | ddl_smurf | even if you were writing c that called a c library, returning char* should come with a method to release it, otherwise malloc is assumed |
17:05:05 | gradha | ddl_smurf: ho ho, like no libc method uses globals and is therefore non reentrant |
17:05:09 | Demos | unless you document that the string comes from a literal or something |
17:05:11 | ddl_smurf | if you have a special allocator (as nimrod does), you should provide a matching deallocator |
17:05:52 | ddl_smurf | alternatively, have two functions (a la windows api), one that returns the size, you allocate and pass that buffer to nimrod for filling |
17:05:56 | gradha | meh, I'll end up creating an objc object from nimrod, at least I know how to do that |
17:07:01 | ddl_smurf | last option is to provide nimrod with a pointer to your allocator and let it allocate with that then fill |
17:08:24 | ddl_smurf | afaik the very very very few globals used are well documented and are mostly special cases so that you don't need to use a global, do you have an example otherwise of libc that is non reentrant when re-entry could be an issue ? |
17:10:04 | gradha | strtok vs strtok_r |
17:11:07 | Demos | you could have in nimrod a function proc getString() : cstring that pins the string, and a release string that unpins it, return the cstring and then in objc copy it to a objectivec managed string then release it |
17:12:47 | ddl_smurf | interesting thanks |
17:13:45 | ddl_smurf | (and indeed, strtok looks horrible enough they don't even provide an example in my man) |
17:21:22 | * | Hannibal_Smith joined #nimrod |
17:22:36 | Hannibal_Smith | Araq, do you frequent the D forum? |
17:23:06 | Hannibal_Smith | I did view some your message in the thread about D vs C performance |
17:25:33 | * | zielmicha quit (Ping timeout: 272 seconds) |
17:28:28 | Demos | interesting thread, seems to me that bjarne stroustrup's reasoning for doing c++ holds, that good abstractions are not really that great if you can not get dirty and actually write fast code /when you need it/ |
17:31:00 | Hannibal_Smith | C++ is a complex language, but have so many good concepts inside it |
17:31:47 | ddl_smurf | C++ is horrible in a company where you must collaborate with a variety of profiles |
17:32:18 | Hannibal_Smith | So Sun made Java, a constrained C++ |
17:32:29 | Hannibal_Smith | And people are "happy" with it |
17:34:47 | Demos | c++ does few things wrong, and what it does do wrong people seem to ignore, but yeah it is not 100% good |
17:35:11 | Demos | it /is/ good enough that until nimrod gets mature it is not worth going and dealing with immature libraries in another language |
17:35:17 | ddl_smurf | I don't trust people who say they fully know c++, and that scares me |
17:35:56 | Demos | Bjarne Stroustup says on a scale of 1 to 10 for c++ knowlege he rates himself a 7! |
17:36:59 | ddl_smurf | sounds about right =) |
17:37:28 | Demos | but this is true of most languages, there is A LOT to know |
17:38:03 | ddl_smurf | very few are as dangerous as c++ to ignore, i've seen experts forget one of (5 now ?) constructors and just assume it wasn't defined |
17:38:10 | Hannibal_Smith | Probably depend also on how a complex the problem that you are going to solve is |
17:38:25 | Demos | ddl_smurf, =delete fo life! |
17:38:29 | Hannibal_Smith | IMHO, a complex problem is helped from a "complex" language |
17:38:31 | * | DAddYE joined #nimrod |
17:38:36 | * | DAddYE quit (Remote host closed the connection) |
17:38:45 | Hannibal_Smith | But using a "complex language" at is "full" is hard |
17:38:50 | * | DAddYE joined #nimrod |
17:39:03 | Demos | there is little pointless in c++, I mean there is vector<bool> and dynamic exceptions specs and export and such but still |
17:39:27 | * | BitPuffin joined #nimrod |
17:39:39 | ddl_smurf | i don't know, few people actually understand C for me stay away from c++ |
17:40:12 | ddl_smurf | stuff like undefined behaviour and sequence points |
17:40:44 | ddl_smurf | or the oh so subtle interaction between threading and signals |
17:41:07 | Hannibal_Smith | Undefined behavior is functional to compiler optimization |
17:41:43 | ddl_smurf | sure, i'm just saying, its hardly ever correctly applied in practice |
17:42:08 | Hannibal_Smith | Ah yes, I think that everybody agree with you on this |
17:42:12 | ddl_smurf | you'll find people going func(i++, i++) and yelling at compilers |
17:42:43 | fundamental | It does seem odd that that ',' was never defined to be a sequence point |
17:43:17 | ddl_smurf | comma doesn't have semantic value, it's just help for the parser |
17:43:22 | Demos | not really, since the primary use of ',' is not really sequencing and I bet actually benifits from it not being sequenced |
17:43:29 | Demos | ddl_smurf, erm what |
17:44:03 | Hannibal_Smith | Do people actually use ,? |
17:44:06 | Demos | for(int i = 0, int j = 0; i < foo.size(), j < bar.size(); ++i, j+=2) P{ |
17:44:07 | ddl_smurf | it's not an operator or expression or anything, its just separator, it disappears after parsing |
17:44:19 | Demos | erm you can overload , |
17:44:36 | ddl_smurf | oh i forgot that, you're right |
17:44:41 | Hannibal_Smith | Demos, some Boost library like Spirit do this |
17:44:46 | ddl_smurf | (overload , in C ??) |
17:44:46 | Demos | also that for loop was wrong |
17:44:50 | Demos | no in c++ |
17:44:58 | Demos | yeah Eigen uses it as well |
17:45:19 | Demos | like Vector3f vec << 1,3,2 |
17:45:29 | Hannibal_Smith | I like the possibility to overload operators |
17:45:43 | Hannibal_Smith | In Haskell people can overload "anything" |
17:45:51 | Demos | no |
17:45:57 | Demos | haskell does not allow arbitrary overloading |
17:46:02 | Demos | you need to use typeclasses |
17:46:13 | Demos | you can /create/ any operator |
17:46:28 | Demos | well any binary operator, I dun think you can make trianry ones |
17:47:03 | Hannibal_Smith | I like this, because you can write little edsl in a more easy way |
17:47:58 | Demos | well nimrod supports more or less arbitrary operators and some neat macros to make infix operators performant |
17:48:29 | Hannibal_Smith | Nimrod is superior to C++ in this aspect |
17:49:00 | Hannibal_Smith | (and not only C++) |
17:51:42 | Hannibal_Smith | Demos, you seems for sure an experienced developer, you don't regret that Nimrod don't support (also) the OOP paradigm? |
17:52:11 | gradha | Hannibal_Smith: how come nimrod doesn't support OOP? |
17:52:22 | Hannibal_Smith | ---it does? |
17:52:48 | gradha | it's a good part of the second tutorial |
17:52:54 | Demos | the fact that nimrod lacks interfaces is kinda annoying, but I hear from people smarter than I that any kind of multiple inheratance (even interfaces) makes multimethods really hard |
17:53:19 | Demos | and I LOVE the way methods in nimrod are just functions |
17:53:55 | Hannibal_Smith | gradha, I have a really bad memory |
17:54:06 | Hannibal_Smith | I must reread the Nimrod documentation |
17:54:08 | BitPuffin | dom96: VNUG! |
17:54:23 | dom96 | I think soon enough somebody will create a nice macro for interfaces. |
17:55:11 | dom96 | BitPuffin: yes sir |
17:55:15 | Hannibal_Smith | I also did read about adding something like typeclass to Nimrod |
17:55:37 | BitPuffin | dom96: I am ze VNUG generrral |
17:55:47 | dom96 | BitPuffin: give me a sec |
17:57:40 | Demos | I thought nimrod already had typeclasses |
17:58:16 | Demos | and dom96 wont that macro use nimrod's generic programming support, not dynamic dispatch? |
17:58:54 | Hannibal_Smith | Demos, is there a documentation page about it? |
17:59:12 | Demos | I dont think so |
17:59:26 | Demos | there is one on typeclasses though, just not how to make your own |
17:59:42 | Hannibal_Smith | Ok |
17:59:43 | Demos | again not 100% sure it is in yet |
18:00:39 | * | brson quit (Ping timeout: 252 seconds) |
18:04:34 | EXetoC | make sure to check the documentation for HEAD |
18:12:01 | EXetoC | that example doesn't yet work IIRC |
18:12:03 | BitPuffin | dom96: slow poke |
18:14:07 | * | CarpNet quit (Quit: Leaving) |
18:14:25 | EXetoC | it'd obviously be hard to miss had it been implemented already :> |
18:15:16 | * | hoverbear joined #nimrod |
18:15:28 | * | ics joined #nimrod |
18:27:17 | Araq | Hannibal_Smith: occasionally I'm on the D forum |
18:38:31 | * | brson joined #nimrod |
18:42:01 | Araq | ddl_smurf: in theory I'd agree with you but in practice inter process communication is so bad that I prefer threads and share nothing over processes |
18:45:00 | ddl_smurf | that's kind of my point, if you're just going to with message passing, might as well IPC, threads for me are a) light fork for when the runtime has a fat ass, b) when the communication needs warrant more than serialisation |
18:45:21 | * | boydgreenfield quit (Quit: boydgreenfield) |
18:45:54 | * | boydgreenfield joined #nimrod |
18:47:58 | Araq | yes but you get instead: |
18:48:14 | Araq | a shitty means even when all you need is serialisation |
18:49:21 | Hannibal_Smith | ddl_smurf, are not process more heavy? |
18:50:05 | ddl_smurf | depends on your point of view, if you want strong isolation guarantees they are pretty much the only way to go |
18:50:39 | ddl_smurf | araq: you really hate pipes/sockets that much ? =D |
18:50:51 | Araq | oh yes I do :P |
18:51:03 | Araq | the API never makes any sense |
18:51:13 | Hannibal_Smith | MPI! |
18:51:15 | ddl_smurf | how so ? |
18:51:26 | Araq | "what do you mean 'there is no way to tell how much data is in the buffer?' " |
18:51:52 | ddl_smurf | undefined behaviour for optimisation by the kernel =) |
18:52:06 | Araq | line based protocols when there is no 'readline' for sockets |
18:52:11 | ddl_smurf | forces you into scalable stream logic |
18:52:17 | Araq | bs |
18:52:25 | Araq | there is no logic involved here |
18:52:54 | ddl_smurf | of course there is, do you really need to know how big the file is before you parse it ? |
18:53:06 | Hannibal_Smith | Probably, writing a production quality MPI library that scale is very hard |
18:53:14 | ddl_smurf | if you do its probably that you're loading the whole thing, i.e. you now have a hard limit |
18:53:39 | Araq | well it helps to read what I wrote |
18:53:49 | Araq | line based protocols when there is no 'readline' for sockets |
18:54:11 | Araq | so? how am I supposed to handle this? implementing my own buffering on top? |
18:54:13 | ddl_smurf | i'm not one for line based (or any separator based) protocols, but that's really another debate |
18:54:23 | Araq | because otherwise I call recv for a single character |
18:54:44 | Araq | which seems rather desastrous for performance |
18:54:47 | ddl_smurf | you could, but the cost is only in the sys call then |
18:54:54 | Araq | yeah |
18:54:57 | Hannibal_Smith | Also, latency is probably bad for socket |
18:54:57 | ddl_smurf | so you buffer sys calls, which you should anyway |
18:55:30 | ddl_smurf | but yeah, processes need some form of buffering, and which really depends on the application |
18:55:40 | * | vendethiel quit (Read error: No route to host) |
18:56:24 | ddl_smurf | the good news is that there are only so many kinds of buffers, and they're imminently easy to put in runtime lib once and for all |
18:56:59 | ddl_smurf | the stupidest buffering (i.e. fixed size, read again on depletion) would be enough for very good performance |
18:57:19 | ddl_smurf | we're not talking audio processing here |
18:57:29 | Araq | well we do that in sockets.nim |
18:57:45 | Araq | and now the Socket object has an attached buffer |
18:58:14 | Araq | so it's not compatible with C's socket type anymore |
18:58:23 | ddl_smurf | you don't need to, a generic buffered stream type thing should be enough for any use case |
18:58:23 | Araq | etc etc. it never stops |
18:59:18 | Araq | perhaps that would have been the better design, but we had ddl_smurf around back then |
18:59:23 | Araq | *had no |
18:59:36 | ddl_smurf | you flatter me sir ! |
18:59:38 | Hannibal_Smith | "Buffered channels allow asynchronous writes, but only up to the buffer size, so that doesn't actually make things easier. Fully asynchronous channels, like you get in Erlang and Haskell don't have this problem, but they are unbounded so you have to be careful about filling them up (Erlang uses a clever scheduling trick to mitigate that problem, though)." <-From Simon Marlow |
18:59:46 | ddl_smurf | ironically i suspect, but nevertheless =) |
19:00:58 | ddl_smurf | more seriously, any of .net/java/ruby and so on are like that, if you want to buffer sockets that's a design choice, might very well be a valid (specially if you deal with threading/select()ing from within) |
19:02:05 | ddl_smurf | Hannibal_Smith: you can get notification on when a write would be accepted, it's not really any trouble |
19:03:04 | ddl_smurf | (you should too, but you are correct in that a good practice forces proc-side buffering, I just don't mind it simply because of the large choices of approaches available, which i wouldn't want my kernel to consider) |
19:03:22 | ddl_smurf | if you don't care so much about performance, just stay in blocking and let the kernel do all the buffering you could want |
19:08:38 | * | brson quit (Ping timeout: 264 seconds) |
19:14:03 | ddl_smurf | I have two problems with posix streams though: closing FDs isn't threadsafe, and dup2() must have come from the same hell as printers just to torment humans |
19:15:47 | Araq | Hannibal_Smith: latency of sockets is a valid point too |
19:17:07 | Araq | we've had situations where we had to cache everything in the process just to get the performance we needed |
19:17:09 | ddl_smurf | (only really for "dumb" sockets, i mean, those without any flow control) |
19:18:28 | Hannibal_Smith | In the end, any production system that have a cluster of machine uses some proprietary hardware for node interconnect (like InfiniBand) |
19:18:43 | Hannibal_Smith | TCP/IP is really the last option |
19:19:57 | ddl_smurf | my guess is that most production systems using clusters don't actually need that |
19:20:11 | ddl_smurf | that's already in the rather specialised zone |
19:21:31 | Hannibal_Smith | These interfaces do things like kernel bypass |
19:22:43 | EXetoC | can pattern be used for importc? can't remember. I'd like to specify a prefix |
19:22:56 | Araq | yes |
19:24:21 | * | brson joined #nimrod |
19:24:54 | EXetoC | ok, grep to the rescue once again |
19:25:55 | EXetoC | I suspect that I can't turn initFreeType into FT_Init_FreeType though |
19:26:51 | EXetoC | so were the rules for proc names going to remain the same, other than the fact that the first character was going to be case sensitive? |
19:27:52 | ddl_smurf | http://nimrod-lang.org/c2nim.html#mangle-directive ? |
19:27:54 | Araq | I think so |
19:28:32 | EXetoC | ok |
19:31:35 | gradha | so looks like I've succesfully made a quicklook plugin to render rst files, any volunteers? |
19:32:35 | Araq | what's quicklook? |
19:32:38 | ddl_smurf | sure |
19:32:51 | gradha | it's the thingy that previews files on macosx |
19:33:07 | gradha | you browse files, hit space, and get the preview of its content |
19:33:19 | ddl_smurf | do i need nimrod ? not on the right computer now |
19:33:23 | gradha | with this plugin files with rst|rest extension are rendered into html |
19:33:42 | gradha | ddl_smurf: you only need to trust running stranger binary code http://dl.dropbox.com/u/145894/t/QuickLook.zip |
19:33:56 | ddl_smurf | no worries =) |
19:34:13 | ddl_smurf | what was it ? qlmanage -refresh ? |
19:34:41 | gradha | presumably, though for me removing and adding the file works too |
19:34:50 | gradha | qlmanage -r |
19:34:59 | gradha | I was getting annoyed that there's no rest ql plugin, but then realized github "misses" searches for qlrest and doesn't show repos |
19:35:13 | gradha | so maybe there's a github conspiracy against finding rest projects |
19:35:39 | gradha | try using github's search for "qlrest" |
19:35:48 | gradha | it will never point you to https://github.com/cluther/qlrest or any of the multiple mirrors |
19:36:00 | gradha | not that you want to, they run python |
19:36:10 | gradha | and therefore have dependencies, and slow runtime |
19:37:43 | gradha | ddl_smurf: presumably xcode targets 10.5, but I don't trust xcode |
19:37:58 | ddl_smurf | its using another plugin (QLColorCode) |
19:38:33 | gradha | you can try qlmanage -d 1 -p file.rst to see why it's not being resolved, or if it's not being found |
19:43:17 | * | boydgreenfield quit (Quit: boydgreenfield) |
19:45:35 | EXetoC | Araq: So I guess I should use --header with c2nim in order to reduce repetition (defines used in several headers) |
19:46:24 | Araq | meh, don't use --header if you can avoid it |
19:46:44 | gradha | I can't avoid using --header |
19:47:04 | EXetoC | I'm sure a search/replace will do in many cases |
19:48:30 | EXetoC | but not modifying the input files is kinda neat, because then it's very easy to sync with the upstream headers, right? |
19:50:03 | * | Demos quit (Ping timeout: 250 seconds) |
19:50:50 | Araq | right |
19:54:21 | ddl_smurf | (I hadn't noticed github had a search functionality but you're right, oddly absent - just google with site: =) ) |
19:54:21 | * | boydgreenfield joined #nimrod |
19:55:21 | gradha | on the other hand qlmark finds stuff, it's a conspiracy |
19:55:35 | EXetoC | but no one does it I think |
19:55:40 | Hannibal_Smith | OT: If it walks like a duck, and quacks like a duck, it’s probably gonna throw exceptions at runtime. |
19:55:45 | ddl_smurf | maybe the tokenizer just likes vowels in the name |
19:56:14 | EXetoC | Hannibal_Smith: +1 |
19:57:27 | EXetoC | (... and quacks like a duck, but ain't one) |
19:57:32 | EXetoC | type errors at runtime sux |
20:00:50 | * | boydgreenfield quit (Quit: boydgreenfield) |
20:04:07 | EXetoC | Araq: can "typedef struct" be dealt with using c2nim directives? unless it's supposed to work, in which case I'll have to look at the preceding lines |
20:04:14 | OrionPKM | araq im getting a sigsegv in the GC |
20:04:17 | OrionPKM | on newObj |
20:05:37 | Araq | EXetoC: typedef struct should work |
20:05:51 | Araq | OrionPKM: that could mean you're out of memory |
20:06:02 | OrionPKM | it was at ~13mb |
20:06:26 | OrionPKM | I am trying to track down a memory leak though |
20:07:03 | Araq | OrionPKM: -d:useSysAssert -d:useGCAssert |
20:07:08 | ddl_smurf | does the gc work with electricfence etc ? |
20:07:11 | * | boydgreenfield joined #nimrod |
20:07:13 | Araq | and see what that changes |
20:07:31 | Araq | ddl_smurf: don't think so, it surely doesn't work with valgrind |
20:07:52 | Araq | unless you know how to config valgrind, but I don't |
20:08:11 | ddl_smurf | god no |
20:09:18 | ddl_smurf | does the gc work with some malloc or directly with sbrk ? |
20:09:51 | Araq | with mmap |
20:10:26 | ddl_smurf | interesting, so you stick to page sizes ? |
20:10:49 | Araq | yeah |
20:11:02 | Araq | and larger pages would be sweet |
20:11:43 | Araq | but posix doesn't guarantee proper alignment for anything larger |
20:12:24 | ddl_smurf | probably loose performance gain anyway |
20:12:34 | ddl_smurf | compared to a tmalloc or other |
20:15:44 | EXetoC | gradha: --header works for you? I tried to pass an non-existent file, but that doesn't cause an error |
20:19:00 | gradha | yes, --header generates a neat file with all my exportc pragmas |
20:21:48 | EXetoC | gradha: ok, I don't know what's missing here then https://gist.github.com/EXetoC/7950650 |
20:22:59 | gradha | what does that have to do with --header? Oh, wait, you are talking about c2nim, I was talking about the compiler's --header |
20:24:31 | EXetoC | ok |
20:25:14 | gradha | for me compilation of a dummy .c file including those fails because of the checks on line 24 |
20:25:16 | * | Hannibal_Smith quit (Quit: Sto andando via) |
20:25:19 | * | boydgreenfield quit (Quit: boydgreenfield) |
20:26:42 | EXetoC | you'd need all those headers too |
20:27:28 | gradha | can't help you there |
20:29:49 | NimBot | Araq/Nimrod vm2 da687af Hitesh Jasani [+0 ±1 -0]: Add docs for connecting to postgres with keyword/value connection... 1 more lines |
20:29:49 | NimBot | Araq/Nimrod vm2 f340eb3 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Merge pull request #706 from hiteshjasani/master... 2 more lines |
20:29:49 | NimBot | Araq/Nimrod vm2 1abb83e Zahary Karadjov [+1 ±4 -0]: adding some provisions for writing lower-level unit tests targeting specific sub-systems of the compiler... 4 more lines |
20:29:49 | NimBot | Araq/Nimrod vm2 826b817 Zahary Karadjov [+0 ±1 -0]: fixes #708... 5 more lines |
20:29:49 | NimBot | 34 more commits. |
20:30:19 | EXetoC | Araq: is --header for c2nim supposed to work? how have you been dealing with repetition in multiple headers? |
20:31:04 | OrionPKM | araq what will those two flags tell me |
20:31:24 | EXetoC | or whoever I should ask. I don't know who generated all the wrappers |
20:31:34 | Araq | OrionPKM: they might tell you what's really wrong with your code |
20:32:04 | Araq | EXetoC: I think it works, yes |
20:32:14 | Araq | I simply edit the header instead so that c2nim likes it |
20:32:24 | OrionPKM | fingers crossed then |
20:32:24 | OrionPKM | afk |
20:33:24 | * | boydgreenfield joined #nimrod |
20:34:19 | ddl_smurf | (in my experience araq's recommendations, when you try against them, it bites you in very strange ways down the road, so maybe a little git rebase - type stuff for following upstream would be called for) |
20:34:54 | gradha | Araq: the rst parser chokes on unknown .. directives, so I want to add a soSkipUnknownDirectives flag |
20:35:14 | Araq | are you sure that's a good idea? |
20:35:34 | Araq | the directive could affect pretty much everything |
20:35:34 | gradha | the alternative being knowing all possible human invented directives? |
20:35:34 | Araq | you can't just pretend to not know it and go on |
20:36:04 | EXetoC | Araq: That must've been a pain in the ass in some cases. freetype2 apparently consists of 89 headers |
20:36:04 | gradha | so they are listed somewhere? I thought you could make them up |
20:37:04 | Araq | you can but only with a python plugin |
20:37:39 | gradha | wat |
20:37:49 | Araq | EXetoC: c2nim is not yet up for the "I don't want to modify the header" workflow |
20:38:19 | gradha | meh, I guess I have to implement http://docutils.sourceforge.net/docs/ref/rst/directives.html |
20:39:24 | Araq | well RST is incredible spec, no wonder the world ended up with markdown |
20:39:39 | OrionPKM | [GCASSERT] waMarkGray |
20:39:59 | gradha | Araq: I guess I'll wrap one of the markdown C parsers |
20:40:24 | OrionPKM | this time it's a newObj call in jester |
20:40:54 | Araq | OrionPKM: cool, how large is your program? |
20:41:14 | OrionPKM | at runtime? it got up to ~12-13 mb again |
20:41:14 | Araq | no, its source code |
20:41:24 | Araq | looks like the nimbuild bug we're hunting :P |
20:41:39 | OrionPKM | the exe itself is 1057kb |
20:42:04 | * | boydgreenfield quit (Quit: boydgreenfield) |
20:42:14 | * | fundamental quit (Read error: Connection reset by peer) |
20:42:44 | OrionPKM | the good news is if I disable the http request my program is doing and just go to disconnecting/reconnecting from my websocket the memory usage appears fairly stable |
20:43:14 | OrionPKM | but I throw a jester http request, and grows much more quickly |
20:43:24 | OrionPKM | throw in* |
20:43:44 | OrionPKM | afk 15 |
20:45:14 | EXetoC | Araq: I assume that you've resorted to search/replace then. hopefully nimgrep will get the job done |
20:45:34 | * | Demos joined #nimrod |
20:45:34 | Araq | no I *edit* the header file |
20:46:14 | shodan45 | I don't know why, but I always confuse Dart and Rust. But not Nimrod! Nimrod is such a... unique... name. :) |
20:46:24 | EXetoC | -.- |
20:46:24 | Varriount | Lets throw rusty darts. |
20:47:39 | Araq | OrionPKM: yes I know there seems to be a leak on windows |
20:48:24 | shodan45 | it's because "Nimrod" has 6 letters. which is more than 4. hence, better! |
20:48:44 | * | shodan45 goes off to take his pills |
20:49:04 | Araq | shodan45: wrapped Qt already? |
20:49:44 | shodan45 | Araq: I wish :/ |
20:49:59 | shodan45 | I was mostly asking out of curiosity |
20:50:19 | shodan45 | I need a lot more experience with nimrod before trying something like that :) |
20:50:44 | gradha | shodan45: nah, you only need the correct amount of alcohol |
20:53:04 | shodan45 | if I were to wrap Qt, I'd want it to be nimrod-ized, like how PyQt added some niceties on top of Qt to make it more "pythonic" |
20:53:39 | shodan45 | and I just don't know enough nimrod yet to know what "nimrod-ized" means |
20:53:39 | gradha | I understand that feeling, but it's the kind of feeling which prevents you from starting any big project at all |
20:53:39 | OrionPKM | araq have you been able to reproduce it yourself yet |
20:54:39 | gradha | shodan45: do you know python? |
20:54:39 | shodan45 | gradha: yeah, pretty well |
20:55:04 | gradha | shodan45: well, then nimrod-ized means to look like python but to perform about 20 times faster |
20:55:19 | shodan45 | heh. |
20:55:29 | gradha | I think it's a builtin feature of the language, so don't worry |
20:57:24 | Araq | OrionPKM: couldn't reproduce it under linux if you remember, might try again tonight |
20:57:24 | * | Demos quit (Ping timeout: 245 seconds) |
20:57:39 | Araq | under windows |
21:01:39 | * | fundamental joined #nimrod |
21:01:59 | Araq | OrionPKM: does jester trigger the crash? |
21:03:34 | OrionPKM | i just went to the coffee shop and back, without that call to jester its at 4mb |
21:04:04 | OrionPKM | thats connecting/disconnecting from websocket every 100ms |
21:05:19 | OrionPKM | i mean to say I went to the coffee shop while the program was running.. |
21:06:04 | Araq | well please file a new bug report for the crash |
21:06:19 | Araq | might really help me debugging things |
21:06:44 | OrionPKM | I can perhaps build another sample app that reproduces it w/ just asyncio/jester |
21:07:04 | Araq | please do so |
21:08:34 | Varriount | dom96, ping |
21:09:44 | * | boydgreenfield joined #nimrod |
21:10:44 | Zuchto | what is this thing with the {.effects.}? |
21:11:04 | Varriount | Zuchto, side effect tracking system |
21:11:14 | * | Hannibal_Smith joined #nimrod |
21:11:14 | Zuchto | ah, so "effects" == "side effects"? |
21:11:39 | gradha | not necessarily |
21:11:49 | Varriount | http://nimrod-lang.org/manual.html#effect-system |
21:12:59 | gradha | oh, so effects is for that, I was thinking of tags |
21:19:34 | * | DAddYE_ joined #nimrod |
21:21:44 | * | DAddYE quit (Read error: Operation timed out) |
21:25:39 | * | DAddYE_ quit (Remote host closed the connection) |
21:26:14 | * | DAddYE joined #nimrod |
21:26:44 | * | vendethiel joined #nimrod |
21:32:19 | Varriount | Anyone know why the build server is down? |
21:32:39 | gradha | the VNUG takes up all the bandwidth |
21:32:59 | Varriount | Is that true? |
21:33:09 | gradha | only if you believe me |
21:33:09 | Varriount | Actually, how much is the VNUG costing? |
21:33:19 | OrionPKM | gradha said it, so it must be false |
21:33:29 | OrionPKM | return not gradhaSaidIt |
21:33:59 | ddl_smurf | whats a vnug ? |
21:33:59 | Varriount | OrionPKM, I don't know if I've mentioned this, but whenever I read your name, I think of Ness and Lucas from the Earthbound/Mother series. |
21:34:09 | gradha | vnug = Varriount's Nimrod User Group |
21:34:09 | Varriount | ddl_smurf, teamspeak server for nimrod. |
21:34:24 | OrionPKM | i have no idea what that is :p |
21:34:24 | Varriount | No, It's the virtual nimrod user group |
21:34:34 | EXetoC | gradha: really low bandwidth huh? |
21:34:59 | Varriount | It might be more cost effective to just use something like google hangouts, and have one person on all the time. |
21:34:59 | gradha | EXetoC: dunno about you, I'm streaming kpop |
21:34:59 | ddl_smurf | X) |
21:35:44 | EXetoC | gradha: the best codecs available are often overkill, so maybe it could be lowered then |
21:36:04 | EXetoC | if it can even be configured |
21:36:34 | gradha | EXetoC: kidding, I have nothing to do with the farm's problems |
21:36:44 | EXetoC | c(:)-< |
21:36:54 | gradha | neither do I stream kpop, I prefer to upload whole files at a tiime |
21:37:04 | * | Varriount puts away the pitchforks and flaming torches. |
21:37:24 | ddl_smurf | anyone sc2 here ? |
21:37:34 | Varriount | sc2? |
21:37:34 | ddl_smurf | starcraft 2 |
21:37:34 | gradha | come on Varriount |
21:37:44 | gradha | all the cool kids do sc2 |
21:37:44 | Varriount | No. |
21:38:04 | ddl_smurf | you teamspeak about compilers, but don't sc2…. very neckbeard =) |
21:38:24 | Varriount | I don't have a neckbeard. I'm clean shaven. |
21:38:44 | OrionPKM | talk is cheap |
21:38:59 | ddl_smurf | not on voip its not |
21:39:09 | OrionPKM | actually it's only like $10/mo that's pretty cheap :p |
21:39:09 | gradha | only if you have bandwidth caps or something |
21:39:24 | Varriount | gradha, which most of the world has. |
21:40:04 | gradha | luckily I live in a 3rd world countrly, so I have a plain monthly fee |
21:40:24 | Varriount | Which country? |
21:40:54 | gradha | Spain, the most promising country from the north of Africa |
21:41:04 | Varriount | :O |
21:41:44 | gradha | South corea is much better, instead of skype they use sc2 to chat |
21:42:04 | gradha | "mom, pleas don't zerg rush me while I'm talking with friends!" |
21:42:59 | OrionPKM | araq looks like it's not happening from w/in jester |
21:43:14 | OrionPKM | araq might be happening in my sourcecode filter |
21:43:59 | gradha | Varriount: I just bought some cloud thingy, indeed there are bandwidth caps |
21:43:59 | ddl_smurf | jester is true dom96 style, 3 tiny files and one 20 page file |
21:44:24 | ddl_smurf | would you mind describing what you mean bu source code filter in relation to jester ? |
21:45:14 | Zuchto | hang on... system.== isn't defined for uint16? |
21:45:24 | Zuchto | it isn't defined for any unsigned integer at all? |
21:45:34 | gradha | Zuchto: maybe it is in the unsigned module |
21:46:44 | Zuchto | ... so there is a separate module for unsigned arithmetic? |
21:47:14 | gradha | rumors say people using unsigned types live less |
21:48:25 | ddl_smurf | https://github.com/Araq/Nimrod/blob/master/lib/core/unsigned.nim#L11 |
21:49:00 | Zuchto | still... it's fairly common and as far as logic goes it's often better to use unsigned values if there is no meaning of the value being negative |
21:49:25 | Zuchto | well well... i was expecting to find something odd with nimrod... i guess this is where it starts :) |
21:50:00 | gradha | Zuchto: didn't you read the forum rant? |
21:50:10 | Zuchto | gradha: nope |
21:50:10 | gradha | let me find it for you |
21:50:45 | gradha | search for rant http://forum.nimrod-lang.org/t/313 |
21:52:35 | Zuchto | thanks :) |
21:53:25 | OrionPKM | araq is it possible getLocalTime and/or getGMTTime are leaking? |
21:53:45 | * | fundamental quit (Read error: Connection reset by peer) |
21:54:25 | * | fundamental joined #nimrod |
21:57:25 | gradha | dom96: just got access to a Linux debian7 3.2.0-4-amd64, want a nimbuild tester there? |
21:58:40 | OrionPKM | anyone who has a chance, please test this: https://gist.github.com/onionhammer/7952099 |
21:58:55 | OrionPKM | araq, that leaks on my machine |
22:00:05 | gradha | OrionPKM: interesting "lib/posix/posix.nim(30, 18) Error: undeclared identifier: 'TTime'" |
22:00:15 | OrionPKM | well thats no good lol |
22:00:40 | gradha | yeah, also I've noticed too idetools segsevs recently as you mentioned |
22:03:15 | OrionPKM | gradha try that version |
22:03:25 | OrionPKM | erm, oh wait nm |
22:03:25 | OrionPKM | it wont build for u still |
22:03:55 | OrionPKM | if I comment out the getLocalTime/getGMTime, the memory stays stable |
22:03:55 | OrionPKM | otherwise it grows rapidly |
22:05:05 | gradha | IIRC there are some problems with the default gc and changing the gc to bohem or something may help |
22:05:15 | ddl_smurf | does it need to be both getLocalTime and getGMTime ? |
22:05:25 | OrionPKM | ddl_smurf dont think so |
22:05:35 | ddl_smurf | (you may also have more success introducing some scope) |
22:05:45 | OrionPKM | it can be either or |
22:05:55 | OrionPKM | there is scope |
22:06:40 | ddl_smurf | you never leave a scope in that code, while you overwrite, taking stabs in the dark at the gc, i could guess leaving a scope would help |
22:07:05 | OrionPKM | loop body is a scope, no? |
22:07:25 | ddl_smurf | ok a proc, something that would be on the stack |
22:07:40 | ddl_smurf | (i'm very rusty with nimrod - ha) |
22:08:00 | OrionPKM | I dont think that would make any difference |
22:11:00 | OrionPKM | araq |
22:11:00 | OrionPKM | it's the tzname parameter of tmToTimeInfo |
22:11:35 | OrionPKM | you add in a string to tzname, it adds memory |
22:12:55 | OrionPKM | if I change tzname to initialize to nil, the leak isnt happening |
22:13:40 | ddl_smurf | why would'nt that be GC-ed ? |
22:23:00 | OrionPKM | ddl_smurf did you try that gist? |
22:30:40 | joelmo | OrionPKM: I tried to run it, it doesn't leek memory for me, using 416KB |
22:30:55 | OrionPKM | # doesnt grow in the console? |
22:32:55 | joelmo | OrionPKM: there I get memory: 61000 to 77000 |
22:33:15 | ddl_smurf | nah, no windows, did you try with a proc ? |
22:34:05 | joelmo | Im on 5b96890 if that matters |
22:34:40 | joelmo | oh no sorry, i ran it with 9.2 |
22:34:50 | OrionPKM | no windows? |
22:35:05 | joelmo | Mac |
22:36:35 | OrionPKM | joelmo sorry was responding to ddl_smurf |
22:37:00 | OrionPKM | 61000 to 77000? |
22:37:25 | OrionPKM | in the output? |
22:37:25 | ddl_smurf | mac |
22:37:55 | OrionPKM | ok, so you're both on OSX and it's not leaking? |
22:39:05 | ddl_smurf | holy shit, compiling nimrod got *a lot* faster in a year |
22:39:45 | ddl_smurf | oh, wait, no, that was koch X) |
22:40:35 | OrionPKM | it is faster on osx |
22:40:35 | OrionPKM | because it uses clang by default |
22:41:05 | BitPuffin | Hmm |
22:41:05 | BitPuffin | in a source code filter |
22:42:05 | BitPuffin | if I wanna do <a href="/articles/show/$articles[i].id/$articles[i].slug"> is that the correct way to do it? |
22:42:45 | joelmo | OrionPKM: I was using the latest release though |
22:46:20 | BitPuffin | where articles is a tuple |
22:51:35 | OrionPKM | ok thanks guys, I submitted a bug |
22:52:42 | dom96 | Varriount: Sorry, nimbuild is back up now. |
22:53:04 | dom96 | gradha: We already have a amd64 machine so it's ok. |
22:53:11 | OrionPKM | dom96 does nimbuild have leakage as well? |
22:53:32 | dom96 | OrionPKM: don't think so, why? |
22:53:45 | OrionPKM | araq was saying the build server crashed a lot I think |
22:54:17 | dom96 | that's not because of leakage |
22:54:24 | OrionPKM | what is it because of? |
22:55:07 | * | darkf joined #nimrod |
22:55:16 | OrionPKM | I've been getting SIGSEGV which return stack traces to gc.nim, and it's because of a leak |
22:56:15 | gradha | dom96: tell the truth, nimbuilds depends on your lifeforce and you just took a nap |
23:00:18 | BitPuffin | dom96: bladibla! |
23:00:20 | BitPuffin | nugv! |
23:04:32 | dom96 | OrionPKM: async bugs |
23:09:01 | BitPuffin | dom96: vnugg!! |
23:10:00 | gradha | just received some Apple email telling me next iOS version will suck as badly |
23:10:24 | * | gradha hopes to not have broken the NDA by saying something so obvious |
23:10:51 | OrionPKM | why do you have iOS |
23:11:06 | gradha | it's the thing that comes with iDevices |
23:13:46 | BitPuffin | OrionPKM: join the VNUG! :D |
23:13:53 | OrionPKM | nevar |
23:14:02 | BitPuffin | me and Varriount are in there |
23:14:07 | gradha | OrionPKM: join the VNUG! |
23:14:56 | OrionPKM | i dont use teamspeak |
23:16:03 | * | vendethiel quit (Ping timeout: 240 seconds) |
23:17:35 | * | vendethiel joined #nimrod |
23:18:34 | BitPuffin | OrionPKM: because you hate non-freedom? |
23:23:13 | gradha | good night, honey badgers |
23:23:21 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=hcDEWiH-ciw again) |
23:34:41 | Zuchto | I have a function declared as: proc newPanel*(w, h: int): TPanel = TPanel(w, h, array[TCell, w*h]) and when I try and compile it I get "invalid type: 'proc (int, int): TPanel'" Anyone who could tell me why? |
23:37:08 | Araq | the error msg is weird, but your array[TCell, w*h] can't work |
23:37:25 | Araq | firstly the order is wrong and secondly array constructors don't work like that |
23:38:51 | Zuchto | Araq: ah, thanks |
23:38:55 | OrionPKM | araq https://github.com/Araq/Nimrod/issues/746 |
23:39:52 | Araq | OrionPKM: alright well I'm way more interested in the GC crash |
23:40:21 | Araq | ddl_smurf: ok, lets play sc2 |
23:40:31 | OrionPKM | araq this is the cause IMO |
23:40:55 | OrionPKM | araq once this grows out of hand, the gc would eventually crash i think |
23:41:54 | Araq | hmm alright |
23:42:09 | OrionPKM | i traced that request through jester we were talking about |
23:42:14 | OrionPKM | all the way to that times call |
23:43:27 | ddl_smurf | i'm so bad it keeps giving me 5 more placement matches, bronze is too high for me =) |
23:44:17 | ddl_smurf | (i did reproduce the bug OrionPKM is talking about, but i'm really rusty, not sure i got the gc into the build) |
23:44:58 | Araq | well I never play, so now you know how good I'm at it |
23:45:25 | OrionPKM | best i got was silver :P |
23:45:31 | OrionPKM | but I hate 1v1s |
23:45:42 | ddl_smurf | me too, can't 1v1 drunk |
23:46:07 | OrionPKM | i was probably the equivalent of platinum at my best |
23:46:19 | Zuchto | Araq: even without the none-working array constructor it gives the same error. I replaced the body of the proc with "result.w = w; result.h = h" (but with a newline instead of ;) |
23:46:29 | ddl_smurf | (silver is top 50% i think) |
23:49:29 | ddl_smurf | wait, you sc2 without ts ? |
23:51:57 | ddl_smurf | k well, ready on the gaming channel of the VULVA |
23:52:01 | ddl_smurf | *VNUG |
23:52:21 | fowl | lol |
23:52:23 | fowl | vulva |
23:54:15 | Araq | OrionPKM: well I can reproduce it |
23:54:23 | OrionPKM | which platform? |
23:54:27 | Araq | windows |
23:54:40 | Araq | ddl_smurf: well I'm kidding, no time for playing, sorry |
23:54:52 | EXetoC | Zuchto: names for all the fields must be specified when constructing an object |
23:54:59 | ddl_smurf | pff pussy |
23:55:14 | Araq | EXetoC: really? I don't think so |
23:55:23 | EXetoC | huh |
23:56:13 | Araq | Zuchto: looks suspicious to me, please make a bug report |
23:57:06 | Zuchto | Araq: I found that it "works" if I just remove the openarray field in the tuple (TPanel) |
23:57:23 | Araq | Zuchto: well then the compiler is correct |
23:57:32 | Araq | openarrays are only valid as parameters |
23:57:37 | EXetoC | Araq: I mean when actually invoking the ctor T(x: 1...) |
23:58:12 | Araq | EXetoC: I know but you're wrong, it depends on the structure of T |
23:58:13 | Zuchto | ok, how would I then go about if I want a field of a tuple or object to be of a variable length (decided at runtime?) |
23:58:24 | fowl | EXetoC, nope, ur drunk |
23:58:30 | Araq | Zuchto: use a 'seq' |
23:58:30 | fowl | Zuchto, use a seq[T] |