00:22:22 | dom96 | bye |
00:32:14 | Smaehtin | Any documentation on the v2 GC? |
00:32:18 | Smaehtin | Or notes? Anyting? |
00:32:20 | Smaehtin | Anything* |
00:35:02 | DAddYE | bye dom96 |
00:36:09 | DAddYE | quick question any clue how to create a template that accepts: (int, varargs[string], proc (varargs[expr])) |
00:36:10 | DAddYE | ? |
00:50:50 | * | DAddYE quit (Remote host closed the connection) |
01:00:42 | * | q66 quit (Quit: Leaving) |
01:31:09 | * | Smaehtin quit (Quit: Page closed) |
01:54:15 | * | DAddYE joined #nimrod |
02:00:46 | * | DAddYE quit (Ping timeout: 240 seconds) |
02:57:34 | * | DAddYE joined #nimrod |
03:01:08 | * | DAddYE quit (Read error: No route to host) |
03:01:30 | * | DAddYE joined #nimrod |
07:25:23 | * | xilo quit (Ping timeout: 264 seconds) |
08:25:40 | * | zahary__ joined #nimrod |
08:30:26 | * | zahary_ quit (*.net *.split) |
08:46:02 | * | Roin quit (*.net *.split) |
08:54:07 | * | mal``` joined #nimrod |
08:54:48 | * | mal`` quit (*.net *.split) |
09:06:24 | * | tumak quit (*.net *.split) |
09:06:24 | * | nihathrael quit (*.net *.split) |
09:06:24 | * | silven quit (*.net *.split) |
09:06:26 | * | Zor quit (*.net *.split) |
09:06:26 | * | JStoker quit (*.net *.split) |
09:06:26 | * | Araq quit (*.net *.split) |
09:06:26 | * | Araq_ quit (*.net *.split) |
09:06:26 | * | comex quit (*.net *.split) |
09:06:29 | * | Reisen quit (*.net *.split) |
09:06:30 | * | zahary1 quit (*.net *.split) |
09:06:30 | * | mal``` quit (*.net *.split) |
09:06:30 | * | zahary__ quit (*.net *.split) |
09:06:31 | * | reactormonk quit (*.net *.split) |
09:07:54 | * | mal``` joined #nimrod |
09:07:54 | * | zahary__ joined #nimrod |
09:07:54 | * | Araq_ joined #nimrod |
09:07:54 | * | nihathrael joined #nimrod |
09:07:54 | * | zahary1 joined #nimrod |
09:07:54 | * | silven joined #nimrod |
09:07:54 | * | comex joined #nimrod |
09:07:54 | * | Zor joined #nimrod |
09:07:54 | * | Araq joined #nimrod |
09:07:54 | * | JStoker joined #nimrod |
09:07:54 | * | Reisen joined #nimrod |
09:07:54 | * | tumak joined #nimrod |
09:07:54 | * | reactormonk joined #nimrod |
09:08:53 | * | fowl quit (*.net *.split) |
09:08:53 | * | Amrykid quit (*.net *.split) |
09:08:54 | * | dom96 quit (*.net *.split) |
09:10:32 | * | fowl joined #nimrod |
09:10:32 | * | Amrykid joined #nimrod |
09:10:32 | * | dom96 joined #nimrod |
09:13:09 | DAddYE | Hi Nimguys |
09:13:54 | DAddYE | is https://github.com/DAddYE/node.nim/blob/master/tcp.nim#L49-L50 the "best" way to avoid evaluation ? |
09:17:00 | * | DAddYE_ joined #nimrod |
09:19:29 | Araq | I think so |
09:21:39 | DAddYE_ | Araq: thanks! |
09:22:08 | DAddYE_ | in order to support this: https://github.com/DAddYE/node.nim/blob/master/timers.nim#L107-L112 |
09:22:14 | DAddYE_ | aka varargs |
09:22:34 | DAddYE_ | I think I need a macro, correct? |
09:23:12 | Araq | varargs don't require a macro but you have a callback after them ... so yeah a macro can patch over it |
09:23:41 | * | EXetoC joined #nimrod |
09:24:27 | DAddYE_ | Araq: yea was my feel |
09:24:44 | * | DAddYE quit (*.net *.split) |
09:36:03 | Araq | EXetoC: case objects are comparable to sum types |
09:37:19 | EXetoC | oh right |
09:55:36 | * | q66 joined #nimrod |
10:04:57 | DAddYE_ | Araq: qq are regex case insensitive by default? |
10:04:58 | DAddYE_ | :D |
10:05:08 | DAddYE_ | not sure were I can put the /i |
10:05:09 | Araq | no |
10:05:31 | Araq | there are some regex options for that I think |
10:08:49 | Araq | gah ... thanks to feature requests the semantic checking now depends on the documentation generator ... |
10:09:55 | Araq | why is it that feature requests always say "fuck you" to modularity? |
10:10:08 | EXetoC | wut |
10:10:45 | Araq | well the semantic checker suggests symbol descriptions for idetools |
10:10:59 | DAddYE_ | Araq: you need from xx import nil as the default |
10:11:00 | DAddYE_ | :D |
10:11:12 | Araq | and symbol descriptions of course include their doc comments |
10:12:01 | Araq | DAddYE_: no because that screws up x.f(y) syntax |
10:12:25 | DAddYE_ | :* |
10:12:51 | DAddYE_ | real example? |
10:13:01 | DAddYE_ | (not sure if I understood) |
10:13:14 | Araq | from tables import nil |
10:13:20 | DAddYE_ | yes |
10:13:27 | Araq | var t: Ttables.TTable[int, int] |
10:13:42 | Araq | t[23] = 34 # gah []= not imported |
10:14:21 | DAddYE_ | need to check that |
10:15:57 | Araq | tables.`[]=`(t, 23, 34) # fu from import nil |
10:16:11 | DAddYE_ | mmmmmmm |
10:16:15 | DAddYE_ | but |
10:16:20 | DAddYE_ | in this case |
10:16:37 | DAddYE_ | you need a real import all, I mean use |
10:16:54 | DAddYE_ | use tables |
10:17:00 | DAddYE_ | btw |
10:17:07 | DAddYE_ | your example makes sense |
10:17:13 | DAddYE_ | the only thing |
10:17:20 | DAddYE_ | that I can say is that |
10:17:27 | DAddYE_ | since ` ` templates |
10:17:31 | DAddYE_ | are cheap |
10:17:38 | DAddYE_ | and special |
10:17:48 | DAddYE_ | they should be aways imported |
10:18:14 | Araq | myset.incl("abc") |
10:18:19 | Araq | # same |
10:18:33 | Araq | operators are not at all special in nimrod |
10:19:54 | DAddYE_ | I should check how clojure does that |
10:20:01 | DAddYE_ | they have super awesome macros |
10:20:17 | DAddYE_ | but not special operators |
10:20:55 | Araq | last time I checked I couldn't find any spec about clojure's macro system |
10:21:18 | Araq | in fact, hardly any docs about them |
10:21:43 | Araq | except some propaganda about them |
10:21:54 | DAddYE_ | look at example code |
10:21:57 | DAddYE_ | or read the source |
10:22:53 | DAddYE_ | ot but Araq https://github.com/clojure/core.async |
10:22:56 | DAddYE_ | this is awesome |
10:24:14 | DAddYE_ | and why I didn't saw that before!!!!!!!! |
10:24:14 | DAddYE_ | https://github.com/clojure/tools.reader |
10:25:30 | Araq | IPushbackReader # what's that? a prefix? |
10:26:06 | Araq | what do you mean "increase the number of entities and prefixes always come back"? |
10:26:23 | Araq | ;-) |
10:26:32 | DAddYE_ | I java thing only for interfaces |
10:26:45 | DAddYE_ | whose 2/3 guys that still use it |
10:27:01 | Araq | actually it comes from C#, not Java |
10:27:14 | Araq | dunno if Java took over that convention |
10:27:31 | DAddYE_ | ha |
10:27:35 | DAddYE_ | Araq: https://github.com/clojure/core.async/blob/master/examples/walkthrough.clj |
10:28:21 | DAddYE_ | night |
10:28:28 | DAddYE_ | 3.30 am |
10:28:30 | DAddYE_ | :d |
10:28:37 | DAddYE_ | too much nim coding |
10:28:38 | DAddYE_ | hahah |
10:29:21 | DAddYE_ | Araq: remember about the seeeensible case problem |
10:29:53 | DAddYE_ | 10 hugs for an pragma and 8 for scoped vars |
10:34:37 | Araq | bbl |
10:36:50 | * | DAddYE_ quit (Remote host closed the connection) |
10:37:17 | * | DAddYE joined #nimrod |
10:42:10 | * | DAddYE quit (Ping timeout: 276 seconds) |
10:51:46 | * | Roin joined #nimrod |
10:54:47 | dom96 | 'morning |
10:59:58 | EXetoC | 'lo |
11:00:33 | dom96 | h' |
11:31:00 | EXetoC | sup |
11:31:48 | dom96 | nm |
11:33:11 | EXetoC | okok |
11:34:06 | dom96 | what about you? |
11:35:37 | EXetoC | writing Nimrod code ofc |
11:38:01 | * | DAddYE joined #nimrod |
11:39:54 | dom96 | awesome |
11:40:34 | dom96 | !repos |
11:40:34 | NimBot | Announced repos: Araq/Nimrod, nimrod-code/nimbuild, nimrod-code/aporia, nimrod-code/nimforum, nimrod-code/babel, nimrod-code/packages, dom96/jester |
11:40:41 | dom96 | !addrepo nimrod-code csources |
11:40:41 | NimBot | Done. |
11:43:19 | dom96 | grr, why is github's test hook failing |
11:46:58 | EXetoC | does anyone think that implicit conversion of each individual tuple field should be allowed? |
11:49:25 | dom96 | IIRC Araq said there was a reason as to why that is not allowed. |
11:51:26 | EXetoC | fair enough. sometimes explicit is better than implicit |
12:17:06 | EXetoC | it just feels a little redundant when the fields are ranges, that's all |
12:17:33 | dom96 | oh, that's a bug: https://github.com/Araq/Nimrod/issues/500 |
12:18:31 | EXetoC | yeah? ok |
13:28:24 | dom96 | ok, this new 'field not initialized: x' is a bit irritating |
13:29:55 | dom96 | Araq: is there a way to override this? |
13:33:07 | dom96 | I used to be able to just do PAsyncSocket(), now it complains that 'proto' is not initialised. |
14:30:49 | * | Smaehtin joined #nimrod |
14:31:48 | dom96 | hello Smaehtin |
14:32:26 | Smaehtin | Hi :D |
14:34:00 | Smaehtin | Anyone here got any info on what the v2 GC does? Compared to the ref counting or mark/sweep one |
14:34:23 | dom96 | the v2? |
14:34:40 | dom96 | you mean the default one? |
14:34:45 | dom96 | http://build.nimrod-code.org/docs/gc.html |
14:35:12 | Smaehtin | It doesn't say anything about the v2 one. Not sure if it's the default one |
14:35:19 | Smaehtin | From the compiler user guide: |
14:35:20 | Smaehtin | --gc:refc|v2|markAndSweep|boehm|none select the GC to use; default is 'refc' |
14:37:08 | dom96 | hrm, not sure. That may be zahary's slightly modified version of the default GC. |
14:37:47 | dom96 | Araq might be able to tell you the real differences when he's around, or zahary1 (or zahary__) |
14:38:07 | Smaehtin | Alright, thanks :) |
15:15:51 | * | Roin quit (Quit: WeeChat 0.4.1) |
15:16:02 | * | Roin joined #nimrod |
15:16:02 | * | Roin quit (Changing host) |
15:16:02 | * | Roin joined #nimrod |
16:30:31 | dom96 | zsh is still sharing history... -.- |
16:37:15 | EXetoC | :E |
16:38:47 | EXetoC | dom96: do you see that option if you type setopt? |
16:39:03 | dom96 | yeah |
16:39:35 | dom96 | maybe oh-my-zsh is overriding it |
16:40:52 | EXetoC | oh |
17:51:47 | Araq | Smaehtin: the v2 is a slight variation of the standard GC that's still unstable iirc |
17:52:10 | dom96 | Araq: yo. |
17:52:17 | Araq | hi dom96 |
17:52:21 | dom96 | How do I deal with variable name collisions in my macros? |
17:52:38 | Araq | no idea what you mean |
17:52:52 | Araq | use clean macros? |
17:52:58 | Araq | aka not 'dirty' |
17:53:20 | dom96 | Say I want to transform every 'foo' call into a 'var test = 56' |
17:53:33 | dom96 | if the user has multiple 'foo' calls I have a problem |
17:53:38 | Araq | nope |
17:53:48 | Araq | that's what clean templates is all about |
17:54:53 | dom96 | I don't understand how that helps me. |
17:56:02 | dom96 | I NEED to use a macro. |
17:56:07 | dom96 | I'm working on the async stuff. |
17:56:48 | Araq | cool |
17:57:09 | comex | are macros less weird now than they were some years ago? :) |
17:57:27 | Araq | comex: no ;-) |
17:57:40 | Araq | they are more complex now and still feature incomplete and buggy |
17:57:55 | Araq | but we're getting there |
17:58:24 | dom96 | Would be cool if I could stick it all into a 'block' and then {.inject.} from within it :P |
17:59:29 | Araq | you can try macros.quote, dom96 |
18:00:03 | Araq | comex: ok they are less weird now, the parameter lists now work |
18:00:06 | dom96 | er, how does that help? |
18:00:23 | Araq | symbols in macros.quote are clean |
18:00:40 | Araq | and there have been bug reports about it of course |
18:00:47 | dom96 | yeah :P |
18:00:49 | Araq | but it seems to do what you have in mind |
18:00:57 | dom96 | I could never get it working. |
18:02:04 | dom96 | I still don't think you understand my problem. |
18:02:31 | Araq | quite possible |
18:02:57 | dom96 | var line = await readLine |
18:02:59 | dom96 | -> |
18:03:07 | dom96 | var lineReq = PRequest(socket: client, kind: reqReadLine, line: "") |
18:03:11 | dom96 | yield lineReq |
18:03:17 | dom96 | var line = lineReq.line |
18:03:32 | dom96 | Now what happens if the user has two of these calls? |
18:03:42 | dom96 | error: redefinition of 'lineReq' |
18:03:57 | Araq | not if you gensym the lineReq properly |
18:04:06 | dom96 | ok, there we go. |
18:04:09 | dom96 | How do I do that? |
18:05:05 | dom96 | bindSym? |
18:05:14 | Araq | let decl = macros.quote"""var lineReq: PRequest""" |
18:05:23 | Araq | let lineReqSym = decl[0] |
18:05:47 | Araq | (I think and hope) |
18:06:09 | dom96 | won't that generate the same code? |
18:06:13 | dom96 | causing the same error? |
18:06:25 | Araq | I don't think so |
18:08:29 | dom96 | internal error: (filename: compiler/semexprs.nim, line: 1355) |
18:09:52 | Araq | ok, try getAst for a template declaration then instead |
18:10:53 | dom96 | quote just fails with everything... |
18:11:58 | Araq | it's 'quote do' |
18:12:12 | Araq | not quote"""string""", I misremembered |
18:12:29 | dom96 | internal error: (filename: compiler/sempass2.nim, line: 452) |
18:12:32 | dom96 | lol |
18:12:37 | dom96 | in any case |
18:12:41 | Araq | I fixed that |
18:12:42 | dom96 | I submitted an issue on gh |
18:12:50 | Araq | let me push ... |
18:13:12 | dom96 | ok |
18:20:16 | NimBot | Araq/Nimrod master 13e1130 Araq [+0 ±10 -0]: refactorings for the eval engine; bugfix: clean templates as accessors |
18:20:16 | NimBot | Araq/Nimrod master 8f58608 Araq [+1 ±5 -0]: 'modules' module from 'main'; minor bugfixes |
18:20:16 | NimBot | Araq/Nimrod master f706e36 Araq [+7 ±23 -3]: Merge branch 'master' of github.com:Araq/Nimrod |
18:27:05 | * | DAddYE quit (Remote host closed the connection) |
18:27:18 | * | DAddYE joined #nimrod |
18:28:46 | dom96 | yeah, it crashes with a different error now |
18:29:08 | dom96 | https://gist.github.com/dom96/e9b17c5ef05c0a94a325 |
18:30:51 | Araq | do you contruct wrong procs in your macro? |
18:31:52 | dom96 | it works if I use parseExpr |
18:33:46 | Araq | parseExpr for what? |
18:37:32 | dom96 | https://gist.github.com/dom96/313279a22d47f45af6df |
18:40:33 | Smaehtin | Araq: Alright, I see, thanks :p |
18:41:12 | Araq | dom96: alright make a bug report with that lattest error message please |
18:47:12 | dom96 | I'll update the issue I already created. |
18:47:43 | Araq | dom96: does nimbuild know about csources already? |
18:47:49 | dom96 | nope |
18:47:57 | Araq | k |
18:50:21 | dom96 | so, what should I do? |
18:52:49 | Araq | you said parseExpr work for you? so I dunno what you mean |
18:53:16 | dom96 | it works as in the compiler doesn't crash |
18:53:27 | dom96 | it doesn't do what I want, i.e. the variables clash. |
19:02:14 | dom96 | so, what should I do? |
19:02:37 | Araq | ignore the problem for now |
19:02:46 | dom96 | sure |
19:02:49 | Araq | an API is planned and easy to do |
19:02:59 | Araq | 'gensym' for constructing the AST |
19:03:21 | dom96 | good |
19:03:25 | dom96 | how's the VM going? |
19:03:56 | Araq | I dunno |
19:04:54 | dom96 | brb |
19:26:06 | * | DAddYE quit (Read error: Connection reset by peer) |
19:32:06 | dom96 | back |
19:41:26 | * | gradha joined #nimrod |
20:00:47 | * | EXetoC quit (Read error: Connection reset by peer) |
20:04:23 | dom96 | hey gradha |
20:04:29 | * | DAddYE joined #nimrod |
20:05:04 | gradha | hey dom96 |
20:05:18 | dom96 | is your internet this laggy, or are you just torrenting? |
20:05:30 | * | EXetoC joined #nimrod |
20:05:37 | gradha | always torrenting |
20:06:20 | gradha | I'll stop the torrenting, see for 8 hours if it makes any difference for reconnections |
20:06:55 | gradha | you may check my lag now |
20:06:59 | dom96 | I wonder if there is a way you could give nimbuild priority heh |
20:07:47 | gradha | haven't fiddled with the router yet, maybe there are QoS settings, though it would be weird to increas priority to pings |
20:08:32 | * | dom96 waits patiently for nimbuild to ping you |
20:09:37 | EXetoC | seems a bit weird, unless your router can't handle the capacity or something |
20:10:14 | dom96 | now it's 14 seconds |
20:10:20 | gradha | there are three routers between my laptop and the network, plus one is wireless |
20:10:29 | gradha | I guess pings just suck |
20:10:42 | dom96 | lol, well that explains it I guess |
20:10:49 | gradha | everything else feels speedy |
20:11:38 | gradha | I wonder if the 14s ping is now due to time machine kicking in backups, that degrades overall performance |
20:11:46 | dom96 | I remember your ping used to be very small. |
20:11:54 | dom96 | so maybe |
20:12:06 | dom96 | down to 12 seconds now |
20:12:20 | gradha | maybe I'm a host of malware |
20:13:08 | dom96 | yeah, maybe you're running a massive botnet |
20:13:09 | EXetoC | woah, time machine? |
20:13:58 | gradha | it's the Apple Branded TM name for differential backups |
20:14:20 | gradha | rdiff with a really sucky lame interface, usefull nonetheless |
20:15:09 | gradha | actually http://www.nongnu.org/rdiff-backup/, not the plain rdiff |
20:15:18 | comex | but the stars |
20:15:35 | gradha | dom96: check me now |
20:16:29 | EXetoC | I thought maybe you were bending space and shit |
20:16:35 | EXetoC | doesn't seem too complicated actually |
20:16:35 | gradha | haha, just disconnected, man, this connection sucks |
20:16:59 | gradha | don't understand why it affects nimbuild, when I ping a server it's in the 5ms range |
20:17:55 | gradha | pinging nimrod-code.org gives me 60ms |
20:18:11 | dom96 | * Ping reply from gradha: ? second(s) |
20:18:15 | dom96 | hrm |
20:18:21 | gradha | ? seconds? |
20:18:26 | gradha | that's new |
20:18:33 | dom96 | Nimbuild says 10 seconds |
20:18:50 | dom96 | Also I accidentally CTCP GRADHA'd a guy called ping. |
20:19:19 | dom96 | I always get the order of /ctcp wrong :P |
20:19:37 | EXetoC | yeah, the other way seems more natural |
20:19:44 | gradha | maybe the nimbuild thing is a problem with signals under macosx, which I still have to look at |
20:19:45 | EXetoC | +around |
20:20:38 | dom96 | gradha: perhaps |
20:21:37 | dom96 | nooo EXetoC, stop trying to haxor me |
20:21:57 | EXetoC | it wasn't on purpose |
20:22:32 | dom96 | sureee |
20:29:52 | dom96 | Araq: btw I figured out how to pass arguments to my await procs :P |
20:30:21 | dom96 | Perhaps you suggested to do it this way, but I don't remember your suggestions anyway so lets just say I came up with it ;) |
20:30:29 | Araq | sure why not |
20:30:44 | dom96 | It uses a cast though |
20:30:52 | dom96 | So you will probably tell me I shouldn't do it. |
20:31:23 | Araq | what do you cast? |
20:31:29 | dom96 | A PObject |
20:31:38 | dom96 | into it's concrete type |
20:31:45 | Araq | why not convert it then? |
20:31:54 | dom96 | conversion fails at runtime |
20:32:09 | Araq | well ... you know ... |
20:32:19 | Araq | that means it's a pretty bad idea |
20:32:19 | dom96 | dunno, maybe I can save the type desc as well |
20:32:38 | Araq | I don't think so, a type desc is no runtime entity |
20:32:54 | dom96 | oh well. It's better than nothing :P |
20:33:13 | Araq | chances are high it only works until you push it a little |
20:33:30 | dom96 | yeah, well i'll see. |
20:33:37 | gradha | does somebody have a nice usage case for arrays' negative indices? |
20:33:45 | dom96 | maybe you will be able to suggest a way to improve it |
20:34:14 | Araq | gradha: a[-3 .. -1] # picks last 3 items |
20:34:31 | gradha | that's a slice |
20:34:42 | gradha | I mean: why would you define an array with negative indices? |
20:34:53 | gradha | TArray = array[-10..10, int] |
20:35:22 | gradha | nimrod is the first language I know supporting them, so I haven't felt the lack of them for my usual coding |
20:35:22 | Araq | enum x = -1, ... |
20:36:07 | Araq | TArray[TMyEnum, int] |
20:36:25 | gradha | the usage case I've had for negative enums is precisely to force out of bounds exceptions |
20:36:55 | Araq | negative enums come up when wrapping C |
20:37:25 | gradha | but in C they are not used as array indices |
20:37:40 | Araq | true |
20:37:44 | gradha | so it's cool that nimrod supports that but... is it useful? |
20:37:56 | Araq | not very but it's consistent |
20:38:18 | dom96 | people are creative, i'm sure someone will find a use for this feature. |
20:38:46 | gradha | consistent at the const of disallowing negative slices for arrays |
20:39:15 | Araq | ah now you're talking about the real thing |
20:39:20 | gradha | since it seems we are in feature suggestion moonphase I was about to request negative array indices to be dropped |
20:39:34 | Araq | no need to drop them |
20:40:06 | Araq | we could have ordinary slices for them anyway |
20:40:31 | EXetoC | some unused local closures generates internal errors |
20:40:43 | Araq | EXetoC: still? |
20:40:54 | Araq | I fixed that ... |
20:41:02 | EXetoC | ok, when? |
20:41:14 | Araq | before the release of 0.9.2 ... |
20:41:43 | EXetoC | right |
20:42:06 | DAddYE | https://github.com/Araq/Nimrod/issues/535 |
20:42:22 | DAddYE | just because i've few haters |
20:42:23 | DAddYE | hahaha |
20:42:48 | Araq | DAddYE: closed it already |
20:42:51 | dom96 | "That's crazy talk." |
20:42:55 | dom96 | I absolutely agree. |
20:43:08 | EXetoC | ha |
20:43:48 | EXetoC | gotta reproduce it then... I'm not going to bother with another huge test case :> |
20:44:15 | DAddYE | dom96: hehe why? |
20:44:37 | dom96 | Because this isn't C. |
20:44:55 | DAddYE | haaaaaaaa |
20:44:58 | DAddYE | yep |
20:45:09 | EXetoC | I don't care if it looks like C, but yeah it's kinda minor |
20:45:36 | DAddYE | EXetoC: indeed |
20:45:50 | DAddYE | was just a try to prevent (for those who want) |
20:45:52 | EXetoC | actually, nevermind that |
20:45:55 | DAddYE | the use of prefixes |
20:46:16 | EXetoC | much of C's syntax is brackets and what have you |
20:46:55 | EXetoC | prefixes, as in type declarations? that's fine |
20:47:16 | EXetoC | especially since it often doesn't make sense to have a non-reference variation of something, so you might as well go with PFoo anyway |
20:47:21 | dom96 | Another reason is that `&` is string concatenation! |
20:47:25 | Araq | DAddYE: explicitness comes with a tax. it's called verbosity. |
20:47:27 | EXetoC | unless I'm talking about something else here |
20:48:24 | Araq | if you prefer 'ref T' that's fine but then you better live with the verbosity |
20:48:43 | DAddYE | or add a template myself |
20:48:44 | DAddYE | but |
20:48:45 | dom96 | In a language where you use 'not' instead of `!` and 'and' instead of `&&` etc. `&` instead of 'ref' doesn't make sense. |
20:48:59 | Araq | otherwise we already have PT, no need for &T |
20:49:20 | DAddYE | write PT is up to the devel |
20:49:31 | DAddYE | I can write it RT => ref T |
20:49:37 | gradha | dom96: didn't Araq regret using not/and instead of `!`/`&&`? |
20:49:37 | DAddYE | or PT => ref T |
20:49:44 | DAddYE | or use foo = ref object |
20:49:46 | EXetoC | yep, a conscious choice made by you |
20:49:54 | Araq | gradha: nope |
20:50:08 | DAddYE | and source will be less readable |
20:50:16 | dom96 | I love not/and btw |
20:50:38 | EXetoC | it's very easy for me to parse it |
20:50:38 | dom96 | it just makes sense. It's also how Python does it. |
20:50:49 | gradha | Araq: so maybe it was ! being a template? not that it's important anyway |
20:51:07 | Araq | gradha: it was ! for identifier construction |
20:51:09 | gradha | All hail the dongle! |
20:51:37 | EXetoC | T is type, P is ref or ptr. everyone is different of course, but that is very intuitive to me |
20:52:03 | Araq | EXetoC: yeah but people hate it |
20:52:23 | EXetoC | :o |
20:52:29 | DAddYE | EXetoC: hand have no choice |
20:52:35 | DAddYE | EXetoC: and have no choice |
20:52:49 | DAddYE | sources looks less readable |
20:52:55 | DAddYE | api docs looks scary |
20:53:05 | DAddYE | (I'm not saying that's for me) |
20:53:11 | dom96 | To be fair, I haven't seen people complain about the prefixes (except DAddYE) |
20:53:21 | * | gradha opens a bottle of liquor and pours 1/3 of a glass |
20:53:21 | dom96 | They only complain about style insensitivity. |
20:53:28 | EXetoC | so people who don't know the language? in that case, then it's an invalid argument imo |
20:53:39 | Araq | dom96: filwit complained about them heavily too |
20:53:53 | Araq | and so did people whose name I can't remember |
20:53:56 | DAddYE | dom96: the thing is simple |
20:53:59 | DAddYE | mostly |
20:54:02 | dom96 | I've learned to love them... |
20:54:16 | DAddYE | like my some of my friends after seeing |
20:54:30 | DAddYE | prefixes + sensitive case issue |
20:54:39 | DAddYE | don't ever try it or give a chance |
20:54:41 | DAddYE | I did |
20:54:54 | DAddYE | but after like 1 year that I'm checking the language |
20:55:06 | DAddYE | 1 year ago I was too scared too |
20:55:27 | DAddYE | and if now I'm here is because I tried to broke the giant |
20:55:28 | DAddYE | wall |
20:55:43 | gradha | DAddYE: you should try perl |
20:55:46 | DAddYE | between me and my "conventions" |
20:56:10 | DAddYE | gradha: I'had to use ruby, clojure, python (few), scala (few) and many others |
20:56:14 | DAddYE | so perl no thanks |
20:56:15 | DAddYE | :D |
20:57:08 | DAddYE | ruby for hi-level shit, clojure when I need java vm and now after many years I'm looking for some (missing) for low level / c interface |
20:57:09 | dom96 | This, quite simply, sucks. From what I can tell the only reason this is a problem is because people have never used languages which impose this prefix convention. |
20:57:31 | dom96 | There is absolutely no disadvantage to using these prefixes, and there may be advantages. |
20:57:48 | DAddYE | dom96: indeed |
20:57:48 | EXetoC | dom96: yeah, I care more about early adopters that are actually open-minded |
20:58:06 | dom96 | EXetoC: Sadly there are not many out there. |
20:58:32 | EXetoC | unsurprisingly |
20:58:43 | dom96 | It's human nature to fear change I guess. |
20:58:50 | DAddYE | dom96: I agree with you |
20:59:00 | DAddYE | but I'm fucking sad |
20:59:03 | EXetoC | perhaps |
20:59:29 | Araq | well you know ... there IS a forum topic about this very issue |
20:59:48 | DAddYE | that when I talk to people with it they first: scared about community (a language should have a giant community), if you sum the prefix issue + sensitive case |
20:59:56 | dom96 | I am aware. It's nice to give some love to this IRC channel too though. |
20:59:57 | DAddYE | will be super hard that they will give a chance |
21:00:05 | DAddYE | for the reasons you perfectly wrote |
21:00:09 | dom96 | Talking on the forum takes too much thinking :P |
21:00:54 | dom96 | DAddYE: indeed. The biggest problem we have is that we have no large company supporting us and therefore many people don't see the point in investing time in something which could potentially die. |
21:01:34 | EXetoC | those people are probably happy with some well-established industry language then, so whatever |
21:01:51 | DAddYE | dom96: nimrod is so awesome, that day will happen |
21:01:57 | Araq | however this "you can use any style except you need to use T/P prefixes everywhere" is annoying from a philosophical point of view |
21:02:04 | dom96 | If we had Google or Mozilla using Nimrod then people would still use it even if Nimrod had no if statements. |
21:02:20 | Araq | dom96: yeah or no generics ;-) |
21:02:26 | dom96 | yes! |
21:02:43 | dom96 | or no exceptions. |
21:02:44 | dom96 | :P |
21:02:48 | DAddYE | but IMHO we should smooth the edges to make it good for mostly everyone |
21:03:31 | DAddYE | or no metaprogramming |
21:03:39 | gradha | AFAICS a T/P prefix allows having a TArray and an array variable, otherwise you have an Array type and have to use a prefix for every single instance of variable you want to name array, like aArray or something like that |
21:04:09 | DAddYE | gradha: mmm not super true but yep |
21:04:19 | gradha | having seen the horror of aWhatever in other languages I prefer prefixes |
21:04:21 | DAddYE | you should do that at least in order to avoid your confusion |
21:04:29 | Araq | yeah but I consider 'var array: Array' or 'var array: TArray' equally bad |
21:04:31 | dom96 | gradha: If the language is case sensitive you can just use an upper case first letter to mean 'this is a type' |
21:04:46 | Araq | I prefer 'var a: array' |
21:04:52 | dom96 | Which isn't bad. |
21:05:01 | DAddYE | indeed |
21:05:05 | gradha | Or 'var l: array' |
21:05:07 | Araq | use the type system to introduce shortcuts |
21:05:37 | dom96 | I have used Haskell before using Nimrod and liked the 'capital first letter means this is a type' convention. |
21:06:13 | dom96 | perhaps we should make Nimrod dynamically typed and then we wouldn't need to worry :P |
21:06:23 | Araq | btw as soon as you have 'proc copy(dest: var TX, source: TX)' |
21:06:36 | Araq | people strangely stop to name their parameters after the type |
21:06:41 | Araq | *stop naming |
21:06:46 | gradha | dom96: and make nimrod run on the java vm too |
21:06:55 | DAddYE | here https://github.com/DAddYE/node.nim/blob/master/uv.nim |
21:07:06 | dom96 | gradha: yes! |
21:07:10 | DAddYE | a big big number of types |
21:07:14 | DAddYE | but mostly enums |
21:07:19 | DAddYE | for a lot of coders |
21:07:26 | DAddYE | (good or bad reasons) |
21:07:34 | dom96 | gradha: I can't wait to spend money on more RAM! |
21:07:41 | DAddYE | sounds crazy that they can't use |
21:07:43 | DAddYE | for procs |
21:07:52 | DAddYE | the same name |
21:08:04 | gradha | dom96: I heard Sun sells these java hardware accelerated cards for mainframes, they are speedy! |
21:08:37 | DAddYE | or that they should pay attention if GET is an enum or a var because GET or get (var) |
21:08:37 | dom96 | DAddYE: Those aligned : look really odd heh |
21:08:57 | Araq | DAddYE: well ALLCAPS are stupid anyway and the compiler should forbid them IMO |
21:09:08 | DAddYE | Araq: talk with c2nim |
21:09:09 | DAddYE | :D |
21:09:42 | DAddYE | dom96: reason for : aligns is that it's more simple to edit (column editing) |
21:09:44 | Araq | constants are nullary functions anyway |
21:10:06 | dom96 | DAddYE: what editor do you use? |
21:10:11 | DAddYE | dom96: vim |
21:10:14 | EXetoC | I'm not sure what there is to edit |
21:10:42 | DAddYE | dom96: http://vimcasts.org/episodes/selecting-columns-with-visual-block-mode/ |
21:10:56 | EXetoC | anyway, I use an align plugin for vim, but it's still kinda annoying at times, if you change names a lot |
21:11:01 | DAddYE | EXetoC: in some parts I've tried to uint remove u to cast to a int etc |
21:11:10 | DAddYE | yep |
21:11:14 | DAddYE | indeed I don't like it |
21:11:20 | DAddYE | I'll remove soon |
21:11:38 | DAddYE | is only useful for column editing and also |
21:11:42 | DAddYE | to reason about |
21:11:44 | DAddYE | types |
21:11:52 | dom96 | DAddYE: Why would you edit all of those types simultaneously? |
21:11:52 | DAddYE | since I c2nim it |
21:12:15 | DAddYE | dom96: if I want to remove prefixes :D |
21:12:33 | DAddYE | dom96: https://github.com/DAddYE/node.nim/blob/master/uv.nim#L309-L314 |
21:12:44 | * | dom96 looks at all those types without a prefix :P |
21:12:46 | DAddYE | I can remove T and c |
21:12:54 | DAddYE | dom96: did |
21:12:56 | DAddYE | SCARY |
21:12:57 | DAddYE | :D |
21:13:22 | DAddYE | especially with the giant amount of enums |
21:13:25 | dom96 | I would just find & replace the prefixes. |
21:13:32 | dom96 | simple. |
21:13:45 | EXetoC | DAddYE: cast, why? if you need unsigned, then you need unsigned. I mostly need them for C stuff |
21:13:49 | dom96 | With my lovely Aporia! |
21:14:19 | Araq | EXetoC: often I map C's unsigned madness to signed |
21:14:19 | DAddYE | EXetoC: yea wrong example |
21:14:24 | dom96 | but yeah, I would like the look of the code a lot more without all that aligning. |
21:14:45 | DAddYE | but as araq said I usually do the same (in few circumstances) |
21:14:55 | dom96 | I do align var assignments occasionally though |
21:14:58 | DAddYE | to avoid foo.bar = 12.uint8 |
21:15:23 | DAddYE | but I removed the header and use only dlib |
21:15:27 | DAddYE | so I reverted back |
21:15:30 | DAddYE | some of them |
21:15:48 | EXetoC | 12'i8 |
21:16:05 | DAddYE | 12'ui8 |
21:16:12 | DAddYE | unsigned |
21:16:18 | DAddYE | but not sure we have 'ui8 |
21:16:25 | EXetoC | oops |
21:16:32 | DAddYE | and my editor doesn't play nice with ' |
21:16:42 | DAddYE | so I don't use it that much |
21:16:53 | DAddYE | bbl |
21:16:58 | * | DAddYE quit (Remote host closed the connection) |
21:17:25 | * | DAddYE joined #nimrod |
21:17:53 | EXetoC | I mean 'u8 |
21:17:57 | EXetoC | meant |
21:20:10 | EXetoC | Araq: well yeah, whenever possible |
21:21:43 | * | DAddYE quit (Ping timeout: 252 seconds) |
21:32:24 | gradha | Araq: is it expected that the gc SIGSEGVs when I try to iterate over an array with a slice like obj[2.. -2]? |
21:33:25 | Araq | I don't think so ... |
21:33:46 | gradha | what would be the expected behaviour? nop? |
21:33:46 | Araq | however it depends on 'obj' |
21:34:03 | Araq | no idea what you mean |
21:34:22 | gradha | it's a slice for an array with only positive indices |
21:34:47 | gradha | array[0..6, int] and later for i in mirror[2.. -2]: |
21:38:47 | Araq | well make a bug report then |
21:40:10 | gradha | nop == no operation, as in the array would not run due to the start index being bigger than the end limit, but I guess there's first a temporal object construction which is what's failing |
21:41:28 | * | gradha wonders if an awesome static language could detect that case and avoid even generating the whole for block |
21:42:02 | Araq | sure and it's easy to do |
21:42:15 | Araq | I got quite close to implement that |
21:43:48 | dom96 | argh, macros really mess up line numbers |
21:44:10 | gradha | it would be more useful to flag that as an error, since it's unlikely that the programmer wanted that at static time |
21:44:47 | Araq | dom96: the problem is that there 2 different line numbers |
21:45:02 | Araq | the line number it came from if it's copied node |
21:45:16 | Araq | plus the line number from the code that produced the node |
21:45:25 | Araq | what do you want? |
21:45:32 | dom96 | no idea |
21:45:48 | gradha | for some reason macros invoking macros reminds me of c++ inexcrutable nested template errors |
21:46:09 | gradha | how about nested line numbers? |
21:46:19 | gradha | a line number like 23-1255-23 |
21:46:23 | Araq | too expensive to implement |
21:46:55 | dom96 | how do I get the other line number? |
21:46:57 | gradha | ok, I'm starting a quickstarter |
21:47:13 | gradha | err... kickstarter |
21:47:30 | dom96 | for what? |
21:47:37 | Araq | ah so now kickstarter can reduce the compiler's memory usage? |
21:47:51 | gradha | dom96: to raise money for the implementation of nested line numbers |
21:48:02 | dom96 | hah |
21:48:05 | dom96 | i see |
21:48:54 | dom96 | We can surely use the kickstarter money to buy every nimrod user some more memory |
21:49:09 | dom96 | Araq: how do I get the other line number? |
21:49:18 | gradha | haven't actually measured compiler memory usage, is it that bad? like java bad? like openoffice bad? |
21:49:45 | Araq | gradha: it's much better than java but constantly getting worse |
21:50:23 | Araq | dom96: I don't know |
21:50:43 | Araq | newNimNode takes a line number for a reason |
21:51:27 | Araq | oh wait |
21:51:33 | Araq | nobody use it |
21:52:25 | Araq | so it's the line info of the code that creates that node |
21:52:42 | Araq | which is always macros.newNimNode ... |
21:52:49 | Araq | very useful |
21:54:30 | * | gradha smells nested line numbers |
21:55:17 | Araq | dom96: edit evals.nim:1240 |
21:55:42 | Araq | make it callsite.info instead of n.info |
21:55:52 | Araq | c.callsite.info |
21:56:05 | Araq | and check if it improves anything |
21:57:59 | dom96 | ok |
21:59:07 | Araq | gradha: I think nested line numbers are commonly known as "stack traces" ;-) |
22:00:22 | gradha | if a compiler barks an error involving a macro like "blah not found at line x.y.z" that's more compact than a stack trace |
22:00:30 | dom96 | well that didn't change anything |
22:00:46 | gradha | though I guess you would also need filenames other than line numbers, meh, bad idea |
22:01:07 | Araq | plus nobody knows what line x.y.z means |
22:01:33 | gradha | yeah, we would want to scare new programmers to weird compiler errors |
22:01:50 | gradha | it worked for c++ after all |
22:02:23 | dom96 | meh, I guess the line number kinda makes sense |
22:02:39 | Araq | what worked for C++ will hopefully never work again ... |
22:04:10 | gradha | monetization idea: compiler spits out integers, a paid "compiler error pack" translates them to friendly user errors |
22:05:24 | EXetoC | I like that |
22:18:58 | * | DAddYE joined #nimrod |
22:21:22 | * | gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again) |
22:23:33 | * | DAddYE quit (Ping timeout: 264 seconds) |
22:25:42 | * | Reisen quit (Quit: Goodbye) |
22:26:29 | * | Reisen joined #nimrod |
22:42:43 | NimBot | Araq/Nimrod asyncmacro 9f29712 Dominik Picheta [+2 ±1 -0]: First implementation of the async/await-like system with macros. |
22:43:52 | dom96 | Now isn't that sexy? https://github.com/Araq/Nimrod/blob/9f297120d1622dd9f6b08ec7cab582419bb811d2/tests/compile/tasyncitermacro.nim |
22:49:21 | dom96 | Araq: This is how I do the arg passing: https://github.com/Araq/Nimrod/blob/9f297120d1622dd9f6b08ec7cab582419bb811d2/tests/compile/tasynciterraw.nim#L35 |
22:49:23 | dom96 | Thoughts? |
23:03:11 | * | Araq__ joined #nimrod |
23:04:23 | * | Araq_ quit (Ping timeout: 264 seconds) |
23:19:34 | * | DAddYE joined #nimrod |
23:28:58 | * | Smaehtin quit (Quit: Page closed) |
23:38:13 | dom96 | good night |
23:44:46 | * | DAddYE_ joined #nimrod |
23:44:47 | * | DAddYE quit (Read error: Connection reset by peer) |
23:49:35 | * | EXetoC quit (Quit: WeeChat 0.4.1) |