00:09:45 | * | fowl joined #nimrod |
00:40:39 | * | fowl quit (Ping timeout: 256 seconds) |
00:46:02 | * | fowl joined #nimrod |
01:22:20 | * | Trixar_za is now known as Trix[a]r_za |
01:30:42 | * | Trix[a]r_za is now known as Trixar_za |
01:32:40 | fowl | why is immutability so popular |
01:33:11 | fowl | I don't really mind paying a little extra performance for the day to day conveniences of immutability and persistent data structures. |
01:35:03 | fowl | i fail to see how immutability brings convenience |
01:44:18 | rgrinberg | fowl: immutability brings many conveniences to me |
01:44:45 | * | q66 quit (Remote host closed the connection) |
01:45:32 | rgrinberg | easy testing, free sharing, easy roll back to old versions of a data structure |
01:46:29 | * | Trixar_za is now known as Trix[a]r_za |
01:47:26 | fowl | i've never needed to go back to an old version of a data structure |
01:52:32 | rgrinberg | well im sure youve had to test some code or do defensive copying when sharing data structures |
02:19:34 | fowl | in nimrod, arguments are passed as const by default, so its easier to see that the argument will be modified when the function takes var T |
02:20:43 | fowl | see the two map()s for example http://nimrod-code.org/system.html#515 |
02:38:00 | fowl | of course, passing a const ptr type doesnt prevent the fields from being modified |
03:46:08 | * | XAMPP joined #nimrod |
03:46:08 | * | XAMPP quit (Changing host) |
03:46:08 | * | XAMPP joined #nimrod |
03:46:48 | * | Endeg quit (Ping timeout: 256 seconds) |
04:11:28 | * | OrionPK quit (Read error: Connection reset by peer) |
05:42:57 | vegai | I'd like to read about all the tags that are supported |
05:42:59 | vegai | any pointers? |
05:43:31 | fowl | they are listed in the manual i believe |
05:44:14 | vegai | nope |
05:44:21 | vegai | http://nimrod-code.org/manual.html |
05:44:22 | fowl | 1 sec ill check |
05:44:44 | vegai | not comprehensively at least. They are mentioned yes, but only in a small chapter |
05:45:59 | vegai | is there a package manager? |
05:46:19 | vegai | https://github.com/nimrod-code/babel this, I suppose? |
05:48:32 | fowl | yeas |
05:50:09 | vegai | I was reading through this: http://nimrod-code.org/irc.html |
05:50:26 | vegai | which implied that nimrod supports quite fine-grained effect tracking |
05:50:31 | vegai | e.g. |
05:50:32 | vegai | proc reconnect(irc: PIRC; timeout = 5000) {.raises: [EOS, EInvalidValue], tags: [FTime, FReadIO, FWriteIO].} |
05:50:44 | vegai | did I perceive correctly?+ |
05:51:02 | vegai | are tags used only for the effect system or are they more general? |
05:52:13 | fowl | vegai: the manual says that tags are user-defined effects |
05:57:18 | vegai | ah |
05:58:32 | vegai | how do these work, I wonder |
05:58:46 | fowl | http://nimrod-code.org/manual.html#tag-tracking |
05:58:49 | vegai | i.e. in module os there's |
05:58:50 | vegai | proc removeDir(dir: string) {.rtl, extern: "nos$1", tags: [FWriteDir, FReadDir], raises: [EOS].} |
05:59:07 | vegai | yeah, I read that but... |
05:59:31 | vegai | does that mean that if I call removeDir from a proc, that proc also has to have those tags? |
05:59:50 | vegai | or is that just documentation? |
05:59:56 | fowl | no you dont have to use it if you dont want to |
06:01:28 | vegai | so it's mostly documentation? |
06:02:31 | fowl | you can specify your function to have no tags ( {.tags: [].} ) then if you call removedir from it you'll get a compilation error Error: can have an unlisted effect: FWriteDir |
06:03:55 | fowl | so you can control side-effects if you want to, but its not forced on you |
06:04:13 | fowl | personally, i dont use it |
06:05:01 | vegai | ah, so if I leave .tags. altogether away, the effects won't be checked? |
06:05:21 | fowl | right |
06:05:27 | vegai | ok |
06:47:59 | * | Endeg joined #nimrod |
07:11:25 | * | Araq_ joined #nimrod |
07:31:32 | * | Araq_ quit (Read error: Operation timed out) |
07:32:43 | * | Araq_ joined #nimrod |
07:35:27 | * | fowl quit (Ping timeout: 256 seconds) |
07:45:06 | * | fowl joined #nimrod |
07:49:11 | * | amarsahinovic joined #nimrod |
07:49:20 | * | Endeg quit (Read error: Connection reset by peer) |
08:24:02 | reactormonk | now to figure out why echo is useful if I can't have strings in the flashmem. Oh well, let's get it to compile. |
08:24:22 | zahary_ | fowl, this is supposed to work btw: proc newBBtree* (T: typedesc) : TBB_Tree[T] # looks suspicious |
08:25:27 | fowl | zahary_: yeah that wasnt the problem, it was one of the newbbnode functions |
08:25:36 | fowl | im going to try later to isolate it |
08:28:37 | zahary_ | Araq, I would argue that this style should be preferred in the standard library. |
08:28:37 | zahary_ | float.parse("1.10") is nicer than parse[float]("1.10") |
08:29:15 | zahary_ | also generics currently doesn't allow partial instantiation which prevents the user from defining my_custom_cast[T](value) |
08:29:36 | zahary_ | typedesc arguments doesn't have this problem |
08:31:16 | zahary_ | typedesc also allows partial specializations, which are not allowed on generic procs |
08:34:38 | zahary_ | by partial specialization I mean this: |
08:34:38 | zahary_ | proc foo[T: int|float]() = echo "int or float" |
08:34:38 | zahary_ | proc foo[T: string]() = echo "int or float" |
08:34:38 | zahary_ | foo[int]() |
08:35:08 | zahary_ | er, the second one should print "string" |
08:37:34 | fowl | when i get an error from matching typedesc it reports it like "got typedesc[int] ..." can i use typedesc like that? proc foo [T] (ty: typedesc[T]) |
08:38:10 | zahary_ | proc foo(x: typedesc[int]). this will match only int during overload resolution |
08:38:23 | zahary_ | you can also match against a type class |
08:38:26 | Araq_ | zahary_: I don't disagree, I was only looking for patterns that may cause the bug fowl encountered |
08:39:35 | Araq_ | "suspicious" only means "perhaps not as well tested as the older [T] stuff" |
08:40:23 | zahary_ | alright, but my remark was that we are currently using the foo[T]() a lot in the standard library (even for newly introduced stuff) |
08:40:48 | zahary_ | * the foo[T]() style * |
08:41:03 | Araq_ | yeah, old habits ... ;-) |
08:52:57 | * | Endeg joined #nimrod |
09:36:41 | * | Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]) |
10:15:16 | * | q66 joined #nimrod |
10:57:03 | * | amarsahinovic quit (Ping timeout: 256 seconds) |
11:41:57 | * | amarsahinovic joined #nimrod |
11:42:31 | * | amarsahinovic quit (Client Quit) |
11:43:35 | * | amarsahinovic joined #nimrod |
11:57:53 | * | Araq_ joined #nimrod |
12:29:09 | * | amarsahinovic1 joined #nimrod |
12:31:05 | * | amarsahinovic quit (Ping timeout: 252 seconds) |
12:33:38 | * | amarsahinovic1 quit (Client Quit) |
12:44:58 | * | Araq_ quit (Read error: Connection timed out) |
12:47:08 | * | Araq_ joined #nimrod |
13:06:06 | * | __ponce is now known as _ponce |
13:11:01 | * | Trix[a]r_za is now known as Trixar_za |
13:24:11 | * | Araq_ quit (Read error: Connection timed out) |
13:25:08 | * | Araq_ joined #nimrod |
13:27:58 | * | burntsushi joined #nimrod |
13:30:13 | * | Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]) |
13:41:21 | dom96 | hi burntsushi |
13:50:52 | burntsushi | dom96: hiya. i saw you plugging Nimrod on reddit, so i'm just snooping around atm :-) |
13:51:47 | dom96 | burntsushi: Cool, feel free to stick around. Activity mostly happens at about 19pm GMT though :) |
13:52:12 | dom96 | er, 7pm, saying 19pm is a bit redundant oops heh |
13:52:41 | burntsushi | dom96: :P yeah i'll hang out. |
14:57:49 | * | fowl quit (Ping timeout: 276 seconds) |
15:10:14 | * | fowl joined #nimrod |
15:41:45 | * | amarsahinovic joined #nimrod |
16:53:39 | * | Trixar_za is now known as Trix[a]r_za |
17:25:28 | * | epitron joined #nimrod |
17:33:28 | * | amarsahinovic1 joined #nimrod |
17:33:38 | * | amarsahinovic1 quit (Client Quit) |
17:34:25 | * | amarsahinovic quit (Ping timeout: 248 seconds) |
17:37:01 | Araq | hi epitron, burntsushi, welcome |
17:48:05 | * | Endy joined #nimrod |
17:58:23 | epitron | hello! |
17:58:51 | epitron | i popped in because i couldn't find c2nim in the latest distribution |
17:58:58 | epitron | has it been discontinued? |
17:59:26 | fowl | its in compiler/c2nim |
18:02:00 | epitron | i'm using 0.9.2, and it's not in there |
18:02:25 | epitron | $ find . -iname 'c2nim*' |
18:02:26 | epitron | ./doc/c2nim.pdf |
18:02:26 | epitron | ./doc/c2nim.txt |
18:02:26 | epitron | ./doc/c2nim.html |
18:03:02 | Araq | indeed the .zip doesn't contain it ... :-/ |
18:03:15 | epitron | ah, so i should just use the git checkout? |
18:03:22 | Araq | yeah, sorry |
18:03:25 | epitron | np! |
18:03:47 | Araq | seems to be a long standing oversight in the .zip generation |
18:04:28 | epitron | almost a tradition |
18:04:29 | epitron | :D |
18:05:13 | * | Endeg quit (Ping timeout: 240 seconds) |
18:07:44 | Araq | the windows installer contains c2nim.exe but no source code either. nice. |
18:08:47 | * | Boscop quit (Ping timeout: 252 seconds) |
18:14:46 | * | Boscop joined #nimrod |
18:16:56 | epitron | yikes, the nimrod repo is 300 megs |
18:17:46 | Araq | yeah ... pruning it would break all forks afaik |
18:17:55 | Araq | but maybe we should finally do it |
18:18:01 | epitron | ohh |
18:18:02 | epitron | right |
18:18:09 | epitron | well, you could still keep the objects hosted on github |
18:18:22 | epitron | the forks would work, but they wouldn't be tracking the master anymore |
18:18:22 | fowl | clone with --depth 1 it helps a lot |
18:18:49 | epitron | or ... does git fetch not care about reachability :) |
18:22:47 | Araq | epitron: would that be even more confusing for the forkers? |
18:22:56 | Araq | *wouldn't |
18:23:23 | epitron | haha.. true |
18:24:16 | epitron | btw, why is there a csources.zip file? |
18:25:01 | Araq | well it contains the C code necessary for bootstrapping |
18:25:14 | Araq | it's a .zip so that git doesn't track the diffs |
18:25:26 | epitron | oh, you don't want that? |
18:25:50 | * | Boscop quit (Ping timeout: 252 seconds) |
18:26:57 | epitron | how come? :) |
18:27:34 | Araq | why would like to see the diffs for generated C code on github? |
18:27:39 | Araq | *would I |
18:28:06 | * | Boscop joined #nimrod |
18:28:28 | Araq | I do not look at the assembler listings either (except sometimes for testing things) |
18:29:46 | epitron | ahh, i didn't realize it was generated |
18:30:09 | epitron | it's just that putting zipfiles in git repos can make them fat because git can't store binary diffs |
18:30:11 | * | vegai quit (Read error: Connection reset by peer) |
18:30:31 | Araq | yeah I figured by now :P |
18:30:39 | epitron | haha |
18:32:48 | Araq | I guess one can't tell git to include but not track a file? |
18:33:02 | Araq | we don't need the history of .zips only the last one |
18:37:18 | epitron | i think you should just bite the bullet and include the uncompressed source |
18:37:37 | epitron | i guess you like using git log -u? |
18:40:03 | Araq | lol, no. I don't even know what the -u does |
18:47:04 | Araq | what does it do? |
18:53:42 | epitron | shows a diff with each commit :) |
18:53:47 | epitron | -u(nified diff) |
18:54:24 | Araq | I use "git log -p" to see the file changes or take a look at github |
19:07:28 | epitron | that looks identical to -u :) |
19:07:55 | epitron | but, yes, updates to the bootstrapped files would be really annoying in that view |
19:18:25 | * | Endy quit (Ping timeout: 248 seconds) |
19:19:28 | * | amarsahinovic joined #nimrod |
19:19:30 | * | amarsahinovic left #nimrod (#nimrod) |
19:19:36 | * | amarsahinovic joined #nimrod |
19:58:02 | dom96 | epitron: Back when the C sources were unzipped in the repo my browser would crash when viewing the diff of the commit on github, .zip in the repo is certainly not ideal, but currently nimbuild relies on it to know when it needs to rebuild from C sources. |
19:58:19 | dom96 | Also welcome to #nimrod ;) |
20:09:54 | epitron | hahah |
20:09:58 | epitron | okay, that's a pretty good reason |
20:14:47 | * | gradha joined #nimrod |
20:28:29 | * | alexrp joined #nimrod |
20:28:29 | * | alexrp quit (Client Quit) |
20:37:28 | * | Trix[a]r_za is now known as Trixar_za |
21:08:00 | * | gradha quit (Quit: bbl, have youtube videos to watch) |
21:27:16 | * | OrionPK joined #nimrod |
21:54:56 | * | Trixar_za is now known as Trix[a]r_za |
22:08:57 | * | amarsahinovic left #nimrod (#nimrod) |
22:19:43 | * | Trix[a]r_za is now known as Trixar_za |
22:49:02 | * | visitor joined #nimrod |
22:50:33 | dom96 | hello visitor |
22:52:42 | * | visitor quit (Client Quit) |
23:55:17 | Raynes | Gioodbye visitor. |
23:55:22 | Raynes | Goodbye* |
23:58:03 | * | Trixar_za is now known as Trix[a]r_za |