<< 18-04-2014 >>

00:07:32renesacI edited a few dozen lines of the tut1.txt, but git is considering the whole file changed
00:07:36renesac:/
00:08:01renesacI will commit anyway, and hope that github diff is smarter...
00:12:34dom96renesac: you sure your editor didn't change the line endings?
00:12:46renesacoh, I can check
00:13:29dom96git's handling of line endings is really quite annoying
00:15:58dom96good night
00:17:21BitPuffindom96: well an editor should know better
00:18:00renesacyeah... somewow kate was configured for windows line ends
00:23:25EXetoCwhy two bytes to indicate newlines?
00:23:34renesacok, fixed
00:24:12renesacEXetoC, because when using typewriters you needed to do 'carriage return' to start the next line right
00:24:13EXetoCrenesac: you could also try "git config --global core.autocrlf input"
00:24:30EXetoCmaybe in the 19th century :>
00:24:39renesacnah, I used one of those
00:25:02renesacin the 19th century there were no computers
00:25:04*ehaliewicz quit (Remote host closed the connection)
00:25:21renesacwell, notepad++ to the rescue
00:25:41renesacI think I fixed most of the breakage, the diff is now reasonable
00:26:22renesackate couldn't even highlight the line-ends... (I didn't found the option)
00:27:36*Matthias247 quit (Read error: Connection reset by peer)
00:32:42EXetoCbanned. got WH apparently
00:37:47*BitPuffin mumbles about how we should all use hg instead
00:38:04renesachg highlights the line ends?
00:43:07*DAddYE quit (Remote host closed the connection)
00:44:20Skrylarit greatly irritates me when you try to express to someone that you don't like a concept, and they turn around and commit personal attacks in response
00:48:29BitPuffinrenesac: I dunno haha
00:51:10renesachttps://github.com/Araq/Nimrod/pull/1107 <-- ok, new pull request
00:53:43reactormonkdo we have a csv writer with escapes etc.?
00:54:06*Demos joined #nimrod
00:59:06*Demos quit (Ping timeout: 240 seconds)
01:04:26BitPuffinwhat was that tiny computer thing that someone linked the other day
01:04:32BitPuffinthink it maybe was fowl
01:05:25BitPuffincubox
01:11:25fowlOrionPK, 's cubox
01:11:49fowlBitPuffin, did u get it working or what
01:12:14BitPuffinfowl: no
01:12:19fowlwhats the issue
01:14:46BitPuffinI don't wanna rebuild allegro? o.O
01:25:17*nande joined #nimrod
01:31:22fowlBitPuffin, the function was removed, you have to change it to a template
01:32:13fowlBitPuffin, do it inside when SUB_VERSION > 0:
01:41:06*nande quit (Ping timeout: 240 seconds)
01:42:20BitPuffinsubversion is a crappy vcs
01:42:54EXetoC:EEEEEE
01:42:59fowlsvn is king
01:50:11EXetoCfowl: how about that game and stuff
01:55:39fowlEXetoC, i've got no ideas :x
01:56:28BitPuffinfowl: well what do you want me to do
01:56:54BitPuffintemplate al_toggle_display(params): expr = al_set_display_flags(params) ?
02:01:03fowlBitPuffin, except for the al_ prefix
02:01:11BitPuffinyeah
02:06:47EXetoCfowl: so you want me to take care of that part?
02:07:25EXetoCwell I have some ideas but no skills, so that balances it out
02:08:36*Skrylar git rebases fowl
02:08:58fowlBitPuffin, heres the changelog http://alleg.sourceforge.net/changes-unstable.html
02:10:45Skrylary'know what would be cool
02:10:51Skrylarthe pandoc equivalent of data markup
02:14:25Skrylarits pretty common to want to store data files for games in XML because its a more durable format for catching errors, but want the stat sheets to be fed in via CSVs and hand-written blocks being yaml/json
02:16:10BitPuffinfowl: I'll take a look later
02:16:18BitPuffingonna eat some sandwitches and hack some linagl
02:16:55BitPuffinor
02:17:05BitPuffinmaybe sleep, but I feel I haven't gotten much work done today
02:24:16*Demos joined #nimrod
02:37:53*Demos quit (Ping timeout: 258 seconds)
02:39:23*brson quit (Quit: leaving)
02:51:53*q66 quit (Quit: Leaving)
03:13:14*Trixar_za quit (Remote host closed the connection)
03:14:00*Trixar_za joined #nimrod
03:25:29*bjz quit (Ping timeout: 250 seconds)
03:31:06fowlBitPuffin, u wanted allegro bindings, i expect a AAA game by friday
03:31:41*bjz joined #nimrod
03:35:20*Jesin quit (Quit: Leaving)
03:42:23*cark quit (Ping timeout: 246 seconds)
03:51:21*xenagi quit (Quit: Leaving)
03:56:11*superfunc_ joined #nimrod
04:01:53*Cycling joined #nimrod
04:02:58Cyclinghi... can paths of modules be declared inside a file?
04:03:28VarriountErm, what do you mean?
04:03:40VarriountLike, with the import statement?
04:04:59Cyclinglike if modules are kept in a directory other than the current one
04:05:33Cyclingpath of modules
04:05:34VarriountCycling: Modules can be imported by relative or absolute path eg 'import "path/to/module'"
04:06:03Cyclingnice.
04:07:11VarriountCycling: I can't remember what relative paths are supposed to be relative to. I *think* it's to the first module that is imported, but it might either be more complicated, or use a different method.
04:07:40VarriountNimrod might look in multiple place for relative paths.
04:08:00VarriountOr it might use the path the nimrod compiler was invoked in.
04:09:36*EXetoC quit (Quit: WeeChat 0.4.3)
04:19:55Skrylari think i'm going to port over some fuzzy string matching routines
04:20:32fowlSkrylar, add it to the compiler please
04:21:58VarriountSkrylar: diffmatchpatch port?
04:22:16SkrylarVarriount: no, fuzzy strings
04:22:22VarriountSkrylar: https://code.google.com/p/google-diff-match-patch/
04:22:29Skrylarright now i read over hamming and lischetin differences
04:22:33Varriount"Given a search string, find its best fuzzy match in a block of plain text. Weighted for both accuracy and location."
04:22:34Skrylarso you can ask "how similar is dog and fog"
04:23:37Skrylarsublimetext has this awesome thing where it tokenizes the source file and offers fuzzy autocompletion
04:23:49Skrylarso if you have a symbol DoThingsSlowly you can type in "dts" and it suggests that
04:41:04Cyclingthis python code to print the last letter in string is astring = "test" print (astring[-1]) prints 't' Does something similar exist in nimrod?
04:47:27fowlSkrylar, just add fuzzy matching for identifiers (:
05:00:41Skrylarlevenschtein distance is really weird
05:02:10VarriountCycling: I believe strings support negative slicing as well.
05:02:34VarriountIf not, then you can do astring[astring.len()-1]
05:03:55VarriountCycling: Sorry for the slow chat - most of the regulars in here are asleep this time of day.
05:06:10*DAddYE joined #nimrod
05:08:17CyclingVarriount, negative astring[-1] seems not to work but astring[2] does. astring[astring.len()-1] works though no probs thank you
05:08:50Cyclingastring[-1] looks simpler.
05:17:57VarriountCycling: Hm. Odd
05:18:10VarriountCycling: It works for sequences (seqs)
05:21:22Cyclingvar stringa = "test" what would be the quickest way to convert that string into a sequence?
05:22:06renesaca string is a sequence of chars basically
05:22:11renesacwhy you want to convert?
05:23:00Cyclingbecause astringseq[-1] should work want to test it.
05:23:46renesacvar astring = "abcd"
05:23:46renesacecho astring[astring.high]
05:23:53renesacit echos 'd'
05:24:01VarriountCycling: Well, I don't know what the performance impact would be, but the way to convert a string to a sequence, assuming there isn't already a procedure in the stdlib somewhere, would be..
05:24:17renesacI don't think that negative indexes work in nimrod...
05:24:45Varriountvar s = newSeq[char](astring.len)
05:24:58Varriountfor c in astring: s.add(c)
05:25:31Varriountrenesac: Sequences can handle them. Arrays can't, but that's because they can have actual negative indices
05:26:02renesacVarriount, acording to the manual: "A sequence S is always indexed by integers from 0 to len(S)-1 and its bounds are checked"
05:26:29renesac"The lower bound of an array or sequence may be received by the built-in proc low(), the higher bound by high(). The length may be received by len(). low() for a sequence or an open array always returns 0, as this is the first valid index."
05:27:44VarriountHuh, you're right.
05:28:50Varriountrenesac: Ah! *slices* can have negative indices
05:29:35renesacoh
05:29:37VarriountThis is something I'll have to bring up with Araq.
05:29:44renesacslices aren't well documented in the manual it seems
05:30:22VarriountCycling: Try echo("Hello World"[-1.. -1])
05:31:34Varriountrenesac: We need an eval feature for nimbot.
05:31:43CyclingVarriount nice
05:32:33VarriountCycling: It's a bit unorthodox. When Araq awakes, I'll ask him why negative ranges are allowed, but negative indices aren't.
05:33:45VarriountAs far as I know, the only 2 possible reasons against including negative indices are performance (unlikely) and avoidance of user confusion (more likely)
05:34:34Cyclingalist = list(astring) this is something I like in ython to make a list array. maybe var aseqlist = seq(astring) could be done?
05:36:46VarriountCycling: 'proc toSeq(s: string): seq[char] = newSeq(result, s.len());for c in s: result.add(c)'
05:37:23Cyclingi'm slow today
05:37:30VarriountCycling: Do you want an array of strings or an array of characters
05:37:45Varriountcharacters are single.. characters only.
05:38:07Cyclingin python is will make the characters yes
05:38:18*superfunc_ quit (Ping timeout: 240 seconds)
05:38:44VarriountCycling: Then the procedure I just posted will turn a string into a sequence of characters.
05:39:04Cyclinglike that one.
05:39:31renesacVarriount, it won't
05:39:53renesacyou will have s.len() blank values, and then add the string characters after them
05:40:04VarriountHm.
05:40:29renesacIt is in my pipeline hacking the newSeq to add a 'cap' parameter
05:40:39renesacthat is what you wanted
05:40:49renesacwell, I can do it now
05:41:50fowlresult.newseq(s.len); copymem(result[0].addr, s.cstring, s.len)
05:42:08VarriountWell then "proc toSeq(s: string): seq[char] = newSeq(result, s.len());for n, c in s: result[n]= c"
05:42:13Varriountshould work.
05:42:44renesacyeah
05:42:46CyclingVarriount, do you receive Error: 'seq[char]' cannot be assigned to?
05:43:15Cyclingsorry my mistake
05:43:35renesacthere is a 'result' missing there, I think
05:43:51VarriountCycling: You need to turn the semicolon into a linebreak and indent.
05:44:09renesacVarriount, what is the difference between 'gc', 'gc2' and 'gc_ms'
05:44:15renesacI should modify those three?
05:44:36VarriountHuh?
05:45:10VarriountI think 'gc_ms' is the mark and sweep garbage collector.
05:45:14renesacit seems all three define 'newSeq'
05:45:45Varriountrenesac: Probably because newSeq is a magic procedure that dynamically allocates memory.
05:45:49renesacquite a bit of code duplication it seems
05:46:02VarriountEach definition will correspond to a particular garbage collector.
05:46:31renesacthe code seems identical
05:47:14Varriount --gc:refc|v2|markAndSweep|boehm|none
05:47:14Varriount select the GC to use; default is 'refc'
05:47:56renesacok, gc2 is a bit different
05:48:09Varriountrenesac: I can only speculate that they were either different at some point in the past, or are planned to be different in the future.
05:49:10Varriountrenesac: Maybe you can look at the 'newStringOfCap' procedure's implementation - it does for strings what we want for sequences.
05:49:50renesacI'm not sure
05:50:02renesacit is not even in the gc.nim
05:50:54renesacany idea of what is 'newSeqRC1'
05:50:54renesac?
05:51:07renesacand the difference # generates a new object and sets its reference counter to 1
05:51:09renesacok
05:51:10Varriountnew sequence ref count 1?
05:51:13renesacyeah
05:51:40Varriountrenesac: Possibly one is used for optimization purposes. Or maybe it's dead code.
05:51:42renesacwell, I will ask araq latter
05:51:53renesacyeah, probably optimization
05:52:18VarriountIt would be really helpful if we could read Araq's mind without disturbing him. It would make internal documentation so much easier.
05:53:23*Cycling quit (Ping timeout: 258 seconds)
05:59:49*DAddYE quit ()
06:00:25Varriountrenesac: You still there?
06:20:13*bjz quit (Read error: Connection reset by peer)
06:20:44*bjz joined #nimrod
06:20:45Skrylarokay
06:21:09Skrylari ported the levenschtein (i can't spell that) distance function from wikipedia, and also hamming distance for strings
06:25:04VarriountSkrylar: We already have levenschtein in strutils.
06:26:03Skrylarwhere?
06:26:17Skrylaralso you should have said that two hours ago when i said i was doing it :P
06:26:39VarriountSkrylar: I assumed you knew. In strutils
06:26:54renesachello Varriount
06:27:15renesacI'm going to sleep
06:27:30renesacbut if you want to say something, say it
06:30:20renesacgood night
06:30:50Skrylarinteresting
06:31:04Skrylarthere's not a huge difference between the wikipedia version and the strutils one
06:36:32*ehaliewicz joined #nimrod
06:41:49*cark joined #nimrod
07:06:03*bjz quit (Ping timeout: 250 seconds)
07:50:45*bjz joined #nimrod
07:51:44*bjz_ joined #nimrod
07:55:15*bjz quit (Ping timeout: 240 seconds)
08:36:15*zielmicha_beta quit (Remote host closed the connection)
08:39:31*zielmicha_beta joined #nimrod
08:41:08*Tetragon joined #nimrod
08:48:21Skrylarbleh.. tomorrow is due for a lot more yak shaving
09:23:09*Tetragon quit (Remote host closed the connection)
09:36:32*ehaliewi` joined #nimrod
09:36:55*zahary1 joined #nimrod
09:37:38*brihat quit (Ping timeout: 258 seconds)
09:37:58*zahary quit (Read error: Connection reset by peer)
09:39:15*ehaliewicz quit (Ping timeout: 240 seconds)
09:39:25*brihat joined #nimrod
09:41:25*reciprocal joined #nimrod
09:50:37Araqhi reciprocal welcome
09:50:48AraqVarriount: the reason to disallow -1 for ordinary a[i] access is indeed performance
09:54:12reciprocalHi
09:56:59*ehaliewi` quit (Ping timeout: 252 seconds)
09:59:11*Matthias247 joined #nimrod
10:05:45*darkf_ joined #nimrod
10:09:04*darkf quit (Ping timeout: 258 seconds)
10:16:02*darkf_ is now known as darkf
10:20:32reciprocalis assert supposed to echo something when used?
10:32:58Skrylarno
10:33:03reciprocalas in assert ext == ".html" if ext is not ".html" what should assert do?
10:33:17Skrylarit throws an eassert error
10:33:30Skrylaralso assert is elided on release builds
10:33:45Skrylarso you need doAssert, or a regular if/else/throw
10:34:08Skrylarunless its just a debug-time test
10:35:49reciprocali'm using a release build so that explains it
10:36:16SkrylardoAssert remains in release builds as far as i know, and you can also specify a failure message
10:36:28SkrylardoAssert(blah, "OH NO IT BROKE")
10:37:12Skrylarthough as i mentioned an assert isn't so much validation as a panic condition, things like the wrong file extension should return a code or whatnot
11:05:17reciprocalis there a way to control what goes on the stack or heap when working with the GC?
11:08:37reciprocal# allocate memory for TData on the heap: var d = cast[ptr TData](alloc0(sizeof(TData))) From the manual
11:10:00reciprocalcould the TData could be made to go on stack in a similar way
11:30:01Araqreciprocal: var d = TData() # allocates on the stack
11:34:49Araqand IMHO the GC allows for more control than most allocators ;-)
11:35:18*BitPuffin quit (Ping timeout: 245 seconds)
11:36:49*q66 joined #nimrod
11:36:50*q66 quit (Changing host)
11:36:50*q66 joined #nimrod
11:42:22reciprocalproc textchange (text : ptr string); chars[] = "changing text" # works when I call with textchange (addr(text1)) but not when I use "ref" in place of "ptr"
11:45:28*OrionPK quit (Remote host closed the connection)
11:47:15Araqyes. so?
11:48:48reciprocalTraced references are declared with the ref keyword, untraced references are declared with the ptr keyword. I thought the only difference is that one is traced and the other is not. So i'm not sure how to use ref in this case
11:49:55Araq'addr' returns a 'ptr
11:50:24Araq'ptr' is not only untraced, it is also *unsafe* and taking the address in nimrod is unsafe too
11:51:21reciprocaldoing proc textchange (text : ref string) how would that be called?
11:51:50Araqvar ugh: ref string; new(ugh); textchange(ugh)
11:52:25Araq'ref' means it's on the GC'ed heap. so it's always on the heap, never on the stack.
11:52:35Araqand so you need 'new' here
11:53:21reciprocalthat makes good sense.
11:54:02Araqbtw usually you use 'var string' in this case
12:02:25reciprocalif ref is used then ugh = "text won't be assigned" because type mismatch: got (string) but expected 'ref string'. what would be the correct way to assign the text in this case?
12:03:44reciprocali got it texts[] = "text goes here"
12:03:53reciprocalthanks
12:05:09reciprocalworks perfect
12:12:06*io2 joined #nimrod
12:15:57*EXetoC joined #nimrod
12:27:38*tonlika joined #nimrod
12:28:59tonlikahello
12:29:17dom96hi tonlika
12:29:20tonlikaany project build on/using nimrod for example?
12:30:02dom96plenty on github: https://github.com/trending?l=nimrod
12:30:13tonlikaok thanks :)
12:30:15*tonlika quit (Client Quit)
12:31:22*BitPuffin joined #nimrod
12:32:51Araqquick poll: how many cores do you have?
12:33:34dom964
12:34:30reciprocal8
12:35:21EXetoC4
12:35:30*BitPuffin quit (Ping timeout: 240 seconds)
12:36:33Araqwell for now I'm hardcoding 4. :P
12:38:13jez09904
12:39:00EXetoCok now we got enough samples
12:39:08jez0990reactormonk: (in response to "coding in emacs?") nope, vim mostly, but is now the right time?
12:46:47*Araq silently replaces system.rand with system.CpuCount
12:48:56dom96I think it's about time we add a proper multi-line comments syntax.
12:48:58dom96Thoughts?
12:48:59EXetoCAraq: is this what you meant: "const X = defined(x) #\[newline][indent]# ..."?
12:49:16AraqEXetoC: correct
12:49:19EXetoC##\ works, just that it indents lines following the first
12:49:53EXetoCbut the doc command outputs nothing for #\ in this case
12:50:19Araqdoc comments start with ## not #
12:50:58EXetoCwell, that's the same as ##[newline]
12:51:32EXetoCI tried both together with #\. I'll look for this pattern again and compare
12:53:45dom96#| multi-line? |#
12:55:04Araqdom96: should these be nestable? I guess they should
12:55:21*io2 quit ()
12:55:28dom96is """ ... """ nestable?
12:55:34Araqno
12:55:59EXetoCso the only problem is the output formatting
12:56:06dom96hrm, coffeescript uses ### ... ### for multi line comments
12:56:39Araqlets use that then. coffeescript rules
12:57:11*dom96 wonders if you're serious
12:57:29Araqit's always hard to tell isn't it?
12:59:09Araqbut I am serious
12:59:21*psquid joined #nimrod
12:59:29Araq### is not nestable so regex based scanners continue to work
12:59:40Araqand we already use """
13:00:08*Guest59079 quit (Ping timeout: 265 seconds)
13:00:12Araqso it makes perfect sense plus we can always say "It is not our fault, we copied coffeescript"
13:00:59Araqhowever it raises the question: are ### doc comments?
13:01:43dom96if not then it would be nice if we could make them be doc comments
13:02:01dom96take a look at http://rosettacode.org/wiki/Comments
13:02:11dom96maybe you'll find some syntax you like better :P
13:02:57Araqcomments should start with a semicolon as in 6502 assembly :P
13:03:22Araqbut then we don't have non-doc multi line comments
13:03:58Araqmayb we should have #[ long comment that can [ nest ] ]
13:04:08Araq##[ long doc comment that can [ nest ] ]
13:05:10dom96what is the purpose of nesting?
13:05:34Araqyou can comment out code easily that contains long comments
13:05:55Araqor you use an editor that doesn't suck ...
13:05:59Araqspeaking of which
13:06:19Araqwhen I press enter with my cursor in a # section
13:06:32Araqaporia should simply insert an aligned #
13:09:43dom96well then surely you mean: #[ long comment that can #[ nest ] ]
13:10:26Araqno
13:10:52Araqit should count the [ ] whether they start with # is not relevant
13:10:54Araqso I can do:
13:10:57Araq#[
13:11:06Araq computes: a[i] * b[j]
13:11:09Araq]
13:11:44dom96That looks challenging to parse using regex
13:11:56Araqit's impossible
13:12:02Araqto parse using regexes
13:12:04dom96hah
13:12:21*BitPuffin joined #nimrod
13:12:24dom96then why do you want this syntax?
13:12:38Araqnesting is handy, as I said
13:12:44Araqbut ### is fine with me too
13:12:59BitPuffinfowl: you got it
13:13:03BitPuffinbut it's friday now
13:13:07Araqbbl
13:13:29EXetoCthe problem with my proc-generating macro is that the symbols aren't included in the documentation. that might be a problem
13:13:52AraqEXetoC: use doc2 and then they should be listed
13:14:15*reciprocal quit (Remote host closed the connection)
13:14:22EXetoCok. I tried doc again for some reason
13:16:19EXetoCI can't remember why. it works now with doc2
13:16:21EXetoCgreat
13:30:05*darkf quit (Quit: Leaving)
13:32:09EXetoCok so this "NoAutoGlErrorCheck* = defined(noAutoGlErrorCheck)" gets rewritten and that's why I tried 'doc' too.
13:42:43*[1]Endy joined #nimrod
14:14:13*Demos joined #nimrod
14:25:36*OrionPK joined #nimrod
14:27:18EXetoCwhat up
14:49:48*[2]Endy joined #nimrod
14:53:11*[1]Endy quit (Ping timeout: 250 seconds)
15:03:13*Demos quit (Ping timeout: 245 seconds)
15:15:44*BitPuffin quit (Ping timeout: 258 seconds)
15:44:03*Trimsty joined #nimrod
15:51:26EXetoCGL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV that's a mouthful
16:02:18EXetoCshould shadowing of 'result' really be allowed?
16:14:38*Trimsty quit (Remote host closed the connection)
16:19:39*Demos joined #nimrod
16:23:04DemosEXetoC: what up yourself
16:23:24EXetoCkilling time
16:25:14Demossame
16:26:41DemosI decided to refactor my GUI code to be pretty much full on OOP. It was essentially that or do depth buffering and stuff on the drawing. And honestly so what if you have to do a bunch of pointer indirection and heap allocation on GUI objects. There are like 1000 of them max
16:27:27Demoswow. I just got a download link for a journal article. Guess the format
16:27:39EXetoCtxt
16:27:47Demoshtml
16:28:37Demosoh, it is just the bib infor
16:30:33dom96what up my glipglobs?!?
16:32:46EXetoCDemos: that design was that bad?
16:33:23Demoswell it has a "download" link, and the link to get actual PDFs is tiny and under a collapsed tree thing
16:33:44EXetoCno the original GUI code
16:34:00Demoswait what design?
16:34:33DemosI never said what my original design was
16:36:42EXetoCnevermind
16:36:48EXetoCmmh eggs
16:39:25Demosalso when working on this refactoring it struck me how having multimethods means you do not really need interfaces any more. I like that the dynamic dispatch is totally seperate from the type checking
16:39:44*nande joined #nimrod
16:42:31DemosTo kill time I have been borwseing software engeneering journals, kinda interested to see researchers have actually been able to come up with anything interesting
16:52:31renesacAraq, I'm against ### for multiline comments
16:52:51renesacwe already have 'discard """ """ ' for those
16:52:59renesacin what way ### would be different?
16:53:03Araqask dom96
16:53:13Araqhe thinks we need it
16:53:35renesacI'm adding that 'discard' trick to the tutorial
16:53:36dom96typing 'discard' is annoying IMO
16:53:48EXetoCwhen false?
16:54:03renesacwhen false still does some syntax checking, I think
16:54:26EXetoCAraq: another case of "use a real editor"? ;)
16:54:27dom96yeah, and then I have to indent...
16:55:08renesacif we get a different type of multiline comments, they better be nestable
16:55:28renesacthough the normal # comments are already nestable and multiline, if you are using a good editor
16:55:29renesac:P
16:56:46renesac""" """ is used on python too (or actually ''' ''')
16:57:01renesacthe only "wart" is that we have to put a discard in front of it
16:57:54Araqtemplate `//` (x: string) = discard x
16:58:11Araq //""" no need for discard really"""
16:59:00EXetoCI'd reserve that for something more useful
16:59:09renesacI'm using // for integer division in my bithacks module
16:59:10renesac:P
16:59:31renesacI prefer a simpler language
16:59:33EXetoCanyway, just add relevant functionality to aporia
16:59:44EXetoCrenesac: unexported?
17:00:07renesacexported of course
17:00:25renesacalso >> for shr, etc
17:01:23EXetoCeh ok
17:01:31dom96why don't we just make """ ... """ implicitly discardable?
17:01:45EXetoCthat's reasonable I think
17:01:51Demosdom96: if "false":
17:02:00renesacindeed
17:02:25dom96?
17:02:40Demoscome to think of it I think if "false" is not valid
17:02:58renesacI like the idea of ''' and """ implicitly discardable
17:03:36renesacwell, it is an special rule... complicates the language, but better than a new comment format
17:04:01Demosdiscard """ is just fine for me
17:04:04renesacand dom96 please add nestable comments to aporia (by that I mean #)
17:04:10Demosand # will be eaiser when they are not part of the AST
17:04:55renesacI agree with Demos, but I'm also ok with adding that special rule
17:04:57dom96renesac: i'm not sure what you mean
17:05:32Demosyeah comments are not really top on my criteria for language goodness
17:06:02Demosunless you are like ALL CAPS ARE COMMENTS or everything after the 72nd line is a (silent) comment
17:06:03renesacif I select a bunch of text and type "ctrl + shift + c" or "ctrl + /", I want # added to the start of every line
17:06:14renesaceven already commented lines
17:06:46renesacand then have a similar 'uncomment' shortcut that removes one # from every line that has it in the selection
17:06:50dom96renesac: it already adds 'discard """ ... """' when you have multiple lines selected
17:06:57renesacthose are not nestable
17:07:00renesacand are ugly
17:07:08dom96I agree.
17:07:16dom96But I don't have time to work on Aporia right now
17:07:56Demosctrl-v, jjjjjjjj, shift-i, #, esc
17:09:06EXetoC8j
17:09:15EXetoC:p
17:09:25Demosbut just pressing it is faster than counting the number of lines
17:09:53EXetoCisn't relative numbering the default in the latest version?
17:09:56EXetoCthat helps a lot
17:10:11EXetoCI probably wouldn't bother otherwise
17:10:20renesacok, it was uglier because the 'discard' was indented...
17:10:29renesac# comments are superior anyway, with proper editor support
17:13:02EXetoC'when false' is fine if the syntax is correct. nothing wrong with the indent imo
17:13:06EXetoCa block is a block
17:13:46dom96Araq: Are you planning on removing comments from the AST in the future?
17:14:05Araqyeah
17:14:24dom96Then we should get a dedicated multi-line comment syntax IMO
17:15:06dom96Multi-line strings should be multi-line strings, and only multi-line strings.
17:16:15dom96You should be for this idea, you like to type as little as possible after all.
17:16:46Araqmaybe I'm already happy with #
17:18:30dom96are you though?
17:20:40EXetoChe's only tough behind the computer
17:22:21*io2 joined #nimrod
17:23:54*DAddYE joined #nimrod
17:25:51*zezba9000 joined #nimrod
17:26:25zezba9000Saw this article of 10 new langs and Nimrods #13 http://www.infoworld.com/slideshow/146094/not-the-usual-suspects-10-plucky-programming-languages-the-rise-240677#slide9
17:27:46zezba9000** #9
17:28:15renesacthe problem with nested # is that after one nested comment it looks like a doc comment...
17:30:01*zezba9000 left #nimrod (#nimrod)
17:30:44renesacthat is probably why python doc strings are """ """ and not ##
17:30:53*zezba9000 joined #nimrod
17:31:39renesacI forgot this issue with nimrod
17:33:04dom96How is that an issue?
17:33:29dom96I don't see a case where nested # would happen
17:33:33dom96what am I missing?
17:34:46zezba9000How is "#" for a comment an issue. "#" seems better for comments then "//" does. Although the "!" character might make more sense idk
17:34:51dom96what does a nested # even look like?
17:34:55dom96# this is # nested?
17:36:03zezba9000Is "!" used in nimrod for anything?
17:36:27zezba9000err stupid question nvr mind
17:40:14EXetoCmaybe not what you think it is used for. it might be used in pegs
17:40:19*filwit joined #nimrod
17:41:58Araqugh I really with mingw32 had non-broken atomic ops ...
17:41:59EXetoC`!` is overloaded in compiler/sigmatch, macros.nim and pegs.nim
17:42:21Araqit's also part of != and thus everywhere
17:43:36zezba9000Araq: I know, thats why it was stupid question lol. Wasn't thinking
17:43:39VarriountAraq: What about Mingw-w64
17:43:59*askatasuna joined #nimrod
17:44:27AraqVarriount: we can't drop win32 support.
17:44:43*psquid_ joined #nimrod
17:45:05VarriountAraq: Mingw-w64 has both 32 and 64 bit versions, both of which can compile 32 and 64 executables.
17:45:14Araqargh
17:45:22Araqand you tell me *now*?
17:45:33VarriountI assumed you knew
17:45:35zezba9000Varriount: Does it let you compile with the VC++ compiler?
17:45:56Varriountzezba9000: Eh.. what?
17:45:57*psquid quit (Ping timeout: 252 seconds)
17:46:07VarriountMingw is a compiler toolchain
17:46:16VarriountEssentially gcc for windows
17:46:30reactormonkjez0990, I read backlog
17:46:35filwiton windows, GCC seems to be much slower than VC++
17:46:53VarriountYour question is sorta like asking if the intel compiler can use VC++ compiler
17:46:57zezba9000Varriount: I know, but it also lets for posix stuff... so wasn't sure if you could mix posix with VC++ or some crazy thing
17:47:37Demosmingw does not really "do" POSIX
17:47:46Demosapart from having a bash-like shell
17:48:17Demosfor POSIX you need the posix subsystem (windows services for unix applications) which is not depricated, or cygwin which is not great
17:49:32VarriountWhich is why I don't use either, and just kick people into supporting windows.
17:49:32zezba9000Demos: I know, I meant that. So nimrod could use posix like bash shell stuff while still targeting VC++
17:49:46Demosnimrod does not use any shell
17:49:52*DAddYE quit (Remote host closed the connection)
17:50:00zezba9000But idk, on windows I use windows only tools
17:50:10Demosyou are welcome to put VCC in the path on mingw's bash shell
17:51:23zezba9000I compile nimrod once with Mingw and ran a benchmark with it. It seems like G++ for Windows was much slower then VC++.
17:51:32zezba9000If I remember right
17:51:55Demoswere you using the -d:release? were you compileing with a recent version of GCC?
17:52:09Demossometimes there are compiler optimizations that get in the way as well
17:52:21Demoslike small code changes can really change the time for benchmarks
17:52:42zezba9000Yes it was with "release"
17:53:01zezba9000ANd yes with the newest version of MinGW tool chain
17:53:42Araqvisual c++ is not bad when it comes to optimization. could use a good dose of my effect tracking though
17:53:43*DAddYE joined #nimrod
17:53:45Varriountzezba9000: Do you mean, the compilation time was longer, or the executable produced, when run, was slower?
17:54:10zezba9000Varriount: No the exicution time was slower.
17:54:20zezba9000ONLY on windows
17:55:25zezba9000VC++ seems like the compiler you want to use on Windows. And why not as its going to make it easier to interface with other Windows APIs and platforms anyway. I don't see the reason for using the GCC on windows as it will just not be compatible with WinRT ect.
17:56:00Varriountzezba9000: Because as of Windows 8, the Windows SDK no longer has a compiler bundled with it.
17:56:03*Jesin joined #nimrod
17:56:06Araqzezba9000: the reason is we can ship GCC, but can't ship Visual C++
17:56:31VarriountAnd I'd rather not install a 6+ gigabyte IDE just for the compiler.
17:56:40Araqand windows people (myself included btw) really love and expect working installers that don't depend on other stuff
17:57:06*askatasuna quit (Ping timeout: 240 seconds)
17:57:11VarriountAlso, the majority of programs I have to build require autoconf and gcc
17:57:25VarriountBecause of POSIX elitists
17:57:38zezba9000I don't understand that logic when you can just download the VC++ compiler...
17:57:43zezba9000how is that any different
17:58:07zezba9000But sure ship it, thats cool, nothing wrong with it. Just at the end of the day VC++ seems to be the one to go with.
17:58:32Varriountzezba9000: You mean, *just* the compiler, and not all the bells and whistles and horrible large IDE's?
17:58:47*Demos quit (Ping timeout: 252 seconds)
17:59:05zezba9000Varriount: how does that matter. As a window dev you should have Visual Studios 2013 on your computer...
17:59:17Varriountzezba9000: Surprise! I don't.
17:59:42VarriountI have the SDK installed, and use SublimeText as an IDE
17:59:48zezba9000And what do you develop on windows?
18:00:09VarriountNimrod - Wrapping native calls and such.
18:00:28zezba9000Your argument is so silly sorry. Who cares if you have to download VS lol
18:00:54Varriount*shrug*
18:00:56zezba9000Sounds like your just being a hater of MS products which doesn't solve and real world issues
18:01:30VarriountI'm a hater of bundling stuff I'm not going to use with stuff I am going to use.
18:02:46zezba9000Varriount: Do you know how much stuff you have in your OS right now you are never going to "use"...
18:03:03zezba9000We have 500GB to 1TB harddives these days
18:03:34Araqyeah and then you put into a small SSD and mount it as C: and swoosh
18:03:47Varriount^
18:03:49Araqyou can't install MS's products anymore. great.
18:04:01Araqhappened to me btw
18:04:02zezba9000A 250GB SSD is not going away with VS
18:04:25zezba9000Just put your games and low priority apps on another HD
18:05:04VarriountAssuming they like the split-drive finagling involved...
18:05:04zezba9000If you have an SSD you must also have a hard disk
18:06:09Araqzezba9000: this discussion is really pointless. It was a small SSD (100GB iirc) and there was no space left and some of MS's installers require C:\ disk space
18:06:15zezba9000You guys are ridiculous
18:06:33VarriountAraq: So concerning Mingw, would you consider dropping support for the regular 32 bit Mingw for the 32/64 Mingw=w64?
18:06:52Varriount*Mingw-w64
18:07:04VarriountI mean, just for the atomic operations
18:07:25AraqVarriount: how does the switch between 32bit and 64bit work?
18:08:02VarriountAraq: Well, for programs that use autoconf, it's just a --host option
18:08:10VarriountLet me look up the actual compiler flags.
18:11:29VarriountAraq: I assume that you use the options on this page -> http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/i386-and-x86_002d64-Options.html
18:13:29*brson joined #nimrod
18:16:42AraqVarriount: I'm installing mingw64 and we will see
18:29:14*BitPuffin joined #nimrod
18:30:14*ehaliewicz joined #nimrod
18:37:45*BitPuffin quit (Ping timeout: 258 seconds)
18:40:59*EXetoC quit (Quit: WeeChat 0.4.3)
18:41:58AraqVarriount: which one to pick from here http://mingw-w64.sourceforge.net/download.php ?
18:42:34*EXetoC joined #nimrod
18:47:36*EXetoC quit (Quit: WeeChat 0.4.3)
18:48:10renesacdom96, yes
18:48:12renesac# some_commented_out(code)
18:48:12renesac# # This is a comment inside the comment!
18:48:12renesac# # Still inside the nested comment.
18:48:12renesac# some_more_code_in(outer_comment)
18:48:19*EXetoC joined #nimrod
18:48:29renesacok, addin that space between them works even in nimrod
18:48:31renesac*adding
18:49:38renesacso yeah, you only need some basic editor support for multiline nested comments in nimrod (and python, etc)
18:49:59renesacThe problem is that some editors add only "#" for commenting out, not "# "
18:55:27*EXetoC quit (Quit: WeeChat 0.4.3)
18:56:43dom96renesac: yes, and also ## are only doc comments if they are at the very top of a proc body
19:00:44renesacdom96, not true: https://github.com/Araq/Nimrod/blob/devel/lib/system.nim
19:01:11renesacthey can be outside a proc too
19:01:36dom96Yeah. But it's more likely you will end up with nesting inside procs.
19:02:32dom96That said, this is only a problem for IDEs which automatically add and remove '#'
19:02:57dom96it's easily solvable by making sure those IDEs add/remove '# ' instead.
19:03:23renesacyeah
19:03:28zezba9000Varriount: O and BTW, you don't need VS to use the VC++ compiler: http://msdn.microsoft.com/en-us/windows/bb980924.aspx
19:03:37renesacand putting a space after your '#' is good style anyway
19:05:08dom96yep
19:08:24filwitwait.. aren't AST comments on the copping block? or did something change since last i was around?
19:09:10renesaccopping block?
19:09:32filwiter.. scheduled to be removed.
19:09:36filwitplanned**
19:09:45dom96they are
19:10:03renesac'#' yes, '##' I think not
19:10:16renesacremoved from syntax checking
19:10:25filwityeah okay, that's good
19:10:25renesacand the AST, but not from the language
19:10:45filwiti was just confused about you '# # nested comment' stuff above
19:11:00filwitjust checking
19:11:04renesacthis was an example from python
19:11:13filwitah, i c
19:11:16renesacbut that works in nimrod too with the spaces
19:11:28*EXetoC joined #nimrod
19:12:01filwitwait python as ast comments too?
19:12:07renesacno
19:12:18renesacit has simple '#' comments
19:12:21filwiter.. okay nvrmd
19:12:25renesacand """ """ are doc comments
19:13:08renesac(and also multiline strings, like nimrod
19:13:11renesac)
19:17:27*Varriount|Mobile joined #nimrod
19:19:05*[2]Endy quit (Ping timeout: 252 seconds)
19:19:33*io2 quit (Ping timeout: 252 seconds)
19:22:24*nequitans joined #nimrod
19:39:54*Demos joined #nimrod
19:56:13renesaczezba9000, that infoworld article will be a nice reference for the next round of nimrod's deletion review on wikipedia
19:56:47*shodan45 joined #nimrod
19:57:23zezba9000renesac: Nimrod was deleted from Wikipedia??
19:57:30renesacyes
19:57:48renesactwo or three times already
19:57:57zezba9000what why?
19:58:20dom96Not enough reliable references.
19:58:41dom96i.e. it failed their notability requirements.
19:58:46zezba9000lol accourding to who
19:59:02dom96brb
19:59:14renesacacording to wikipedia deletionists
19:59:15zezba9000and I thought Wikipedia was about information, what a joke
19:59:16renesac:P
20:00:14renesachttp://en.wikipedia.org/wiki/Nimrod_%28programming_language%29
20:00:44renesacprobably after the 0.9.4 release we will try again
20:00:46renesac:P
20:03:12*Jesin quit (Quit: Leaving)
20:04:02zezba9000For "notability requirements", it looks like you need more 3rd party references
20:04:13zezba9000and is probably why it failed
20:04:34renesacyes
20:04:56zezba9000If there is anyone using is in a published product that would help
20:05:16Araqyeah but your "I thought Wikipedia was about information" is spot on
20:07:05zezba9000Ya no kidding, although I can understand they may do it for spaming and people making up random stuff that isn't true.
20:11:48*EXetoC quit (Quit: WeeChat 0.4.3)
20:14:36*EXetoC joined #nimrod
20:17:56nequitansregarding wikipedia, does the Dr. Dobbs article count as a good 3rd party reference?
20:18:41Araqwho knows
20:18:47Araqit should
20:19:04EXetoCI think it needs to be an article by the pope himself
20:20:28*BitPuffin joined #nimrod
20:21:28nequitanslol, my blog post alone has gotten > 10,000 views, and most people I tell Nimrod about are genuinely interested, so it's quite surprising to me.
20:23:18BitPuffino/
20:23:23BitPuffinnequitans: interesting, what blog post?
20:23:57nequitansi wrote it about a month and a half ago: http://geetduggal.wordpress.com/2014/03/03/consider-nimrod/
20:25:46nequitansi got an idea, we should get tatler (http://en.wikipedia.org/wiki/Tatler) to do an article on Nimrod. That will get it on Wikipedia
20:31:59BitPuffindoesn't really look like a magazine that talks about programming languages lol
20:33:14*vendethiel quit (Read error: Connection reset by peer)
20:37:17*vendethiel joined #nimrod
20:38:16dom96Araq: Why does `==` for TTable's use mget?
20:38:32Araqshould be faster
20:38:55dom96Why does the proc signature not reflect this?
20:39:03BitPuffin"should be faster" - optimizing noobs
20:39:36*flaviu joined #nimrod
20:39:50Araqdom96: why should it? every TTable has a mget
20:39:51dom96Also, should the compiler not catch this? I guess because of the generics it's only an error when `==` is called on a non-var TTable.
20:40:13Araqah I see
20:40:32Araqok, my bug then
20:40:43dom96Should I add 'var' to the signature?
20:40:48Araqhell no
20:40:58dom96then should I get rid of the 'mget'?
20:40:59Araqfix the implementation instead
20:41:02Araqyeah
20:41:35dom96ok, what about my second question. Should the compiler catch this at the point when the proc has been defined?
20:41:36flaviudom96: Whats wrong with discard """ """
20:41:56dom96flaviu: I dislike typing 'discard'
20:41:58Araqdom96: no the compiler shouldn't catch it, generics are duck typed
20:42:14Araqfor better or worse ...
20:42:37dom96hrm, ok.
20:44:21Araq SomeFlowVar* = shared ptr object of TObject # hmm
20:44:43dom96flaviu: And I don't always have an IDE which does the work for me.
20:45:00dom96Like when I want to quickly edit something on my VPS...
20:45:04Araqmakes me wonder why people are obsessed with writing 'ref T' everywhere
20:45:47Araqthis is only getting worse. So people write 'region ptr T' everywhere because they can't stand a type prefix?
20:46:04flaviudom96: I use vim, neither do I. But I don't like changing syntax for something that insignificant
20:47:38dom96Would making """ implicitly discardable be so terrible?
20:48:29Araqthat can't resonably work, dom96
20:48:29flaviuNo, that sounds like a good solution. I personally like the template method, but I'm fine with that too.
20:48:54Araqcase x
20:48:59Araqof true: "abc"
20:49:12Araqof false: """nasty comment""" "xyz"
20:49:14Araq???
20:49:48Araqproc p: string =
20:49:57Araq """ implements nothing of value """
20:50:03Araqoops
20:50:05EXetoCthey are claiming that the prefixes aren't as obvious, right?
20:50:26flaviuAraq: How about overloading the comment operator :P
20:51:05dom96if we introduce an operator for 'discard' then it will make 'discard' a little less effective.
20:51:08renesacI prefer prefixes to sufixes, and 'ref T" to sufixes too
20:51:22*ehaliewicz quit (Remote host closed the connection)
20:51:28AraqEXetoC: no. they are just ugly.
20:51:31dom96It'll be easier to miss in normal code, and you know that people will use it everywhere in place of 'discard'
20:51:34*ehaliewicz joined #nimrod
20:51:42flaviuI was half-joking, not really serious
20:51:46EXetoCsomeone claimed that
20:52:13renesacI'm not sure if I prefer prefixes to 'ref T'
20:52:52flaviuWhat if someone doesn't declare a PThing type? Then its a mix of `ptr Thing` and people making their own `PThing`s
20:52:53renesacat first I though prefixes were very ugly, but I came to like them... still not pretty, but the alternatives aren't very good too
20:53:24flaviuI prefer the separate symbol over the prefixes
20:55:41renesacthe only problem with separate symbol is if someone exports only 'ref T' and not 'T'
20:55:53renesacit is inconsistent then
20:56:00Araqrenesac: that is a feature though
20:56:12EXetoCdom96: might as well change it do 'disc' or something then
20:56:27renesacI know, sometimes you don't want people to directly touch your type
20:56:30EXetoCor dis!
20:56:36Araqbut you should always be able to do type(PFoo[]) to get the underlying type
20:56:38renesacand prefixes were great to make this explicit
20:56:38EXetoCret, res
20:56:54flyxhey guys, is the stream API unable to read files that contain null bytes?
20:57:06flyxbecause it stops here when encountering the first null byte
20:57:11dom96EXetoC: might as well add a proper multiline comment syntax!
20:59:05flaviuAraq: Remember when I suggested to get rid of most keywords and you pointed out scoping? What about macros, those could avoid scoping issues?
21:00:47Araqflyx: I don't think so, but outputting the string perhaps stops at the first 0 byte
21:01:14Araqwhen you use 'echo', that is
21:01:24flyxAraq: ah, that might as well be the case. I'll investigate further.
21:01:29Araqstdout.write should be fine with 0
21:02:04Araqflyx: in any case make a bug report please
21:02:23flyxAraq: will do, tomorrow. bedtime for me now
21:02:45Araqsure thing
21:03:42renesacAraq, can I add an additional 'cap' parameter to 'newSeq'?
21:03:56Araqflaviu: no I don't remember
21:04:10renesacor you think three parameters is too much and preffer the 'newSeqOfCap' that I think is ugly?
21:04:36AraqnewSeqOfCap is at least consistent
21:04:50Araqand less error prone than 2 int params
21:04:57Araqwhere 1 is optional
21:05:06renesacwe have named parameters
21:05:28Araqsure but still
21:06:02renesacand why 'len' isn't assignable?
21:06:18renesaclike 'someseq.len = 10'
21:06:27BitPuffinbecause it's not a property
21:06:32BitPuffinis it?
21:06:35AraqsetLen predates `x=` accessors
21:06:35flaviuAraq: http://build.nimrod-lang.org/irclogs/13-03-2014.html 20:34
21:06:35flaviuBasically, the keywords could be replaced with macros to do the actual translation into AST. So `if` might be `macro if(expr: bool, body: stmt)`
21:06:37BitPuffinor is it a proc?
21:06:49EXetoCdom96: what's wrong with indenting? nothing imo, and it's greppable and so on
21:06:52BitPuffinoh wait we have x= accessors?
21:06:54BitPuffinnice
21:06:56renesacAraq, can I add an accessor then?
21:07:11renesacthat calls setLen?
21:07:12flaviuIt wouldn't work for if though, it also would have to handle else in that case
21:07:12dom96EXetoC: comments should be allowed anywhere.
21:07:22dom96EXetoC: And that is why they will be removed from the AST
21:07:25renesacand maybe deprecate setLen?
21:08:11flaviudom96: What about nimrod pretty? Or possible AST-based automated refactorings?
21:09:05dom96flaviu: No idea.
21:09:06EXetoCdom96: seems like a minor point
21:09:52Araqrenesac: well I still prefer 'setLen'
21:10:24Araqassigning length which might trigger a reallocation doesn't seem to be right, IMHO
21:10:37renesacit is more intuitive
21:10:50renesacyou don't have to open the manual to search for it
21:10:55flaviudom96: How will docgen work? It relies on the AST documentation information, so it would need to be changed a huge amount
21:11:17dom96flaviu: I'm wondering that myself.
21:11:29Araqrenesac: fix the bugs that keep "nimrod idetools" from working instead
21:11:37dom96Someone broke $ for floats.
21:11:45renesacwhat bugs?
21:11:47Araqreactormonk.
21:12:05dom96Araq: known bug?
21:12:06Araqrenesac: we have lots of tests, and nobody knows if they work. I bet they don't.
21:12:22Araqdom96: reactormonk told me it's "fine"
21:12:32AraqI told him to be very careful
21:12:47Araqturns out ... people don't listen to me and regret it
21:12:48dom96yeah... it just gives 0.0 for everything
21:13:09flaviuI'm really against removing the comments from the AST, it losses quite a bit of flexibility.
21:13:36Araqwell doc comments will stay being part of the AST
21:13:49Araqso the docgen works just as before
21:15:15flaviuHow about nimrod pretty? That'd be much harder to do after removing comments from the AST.
21:16:08Araqno
21:16:56Araqnimrod pretty already tracks accurate line, column information and performs edits that keep as much as possible
21:17:10Araqso your \n\n\n in the code stay this way
21:17:19EXetoCdom96: would it be for doc comments too?
21:17:29Araqeverything else is simply too annoying
21:17:56Araqand now that we have that "technology" keeping comments in the AST doesn't buy us anything for "nimrod pretty"
21:19:36flaviuHmm, I guess not. Some special cases might be a bit more tricky, but no point in complicating the compiler for those.
21:20:19filwitflaviu, AST comments make block-commenting difficult for various IDEs, since Nimrod is indent-sensitive and comments must rest on the appropriate indent
21:20:48Araqfilwit: that's actually quite an orthogonal issue
21:21:15Araqthe alignment requirement simply looked like a good idea
21:21:38EXetoCdom96: anyway, I wouldn't mind it. have you discussed this on the forums?
21:21:41Araqbut I can imagine other ways and still have them part of the AST
21:21:56filwitAraq: i'm not sure exactly what you're saying
21:22:23flaviuAraq: What is the goal of removing them from the AST?
21:22:24filwiteither way, having them part of the AST makes supporting different IDEs/editors more difficult
21:23:01flaviufilwit: nimrod is the IDE, anything else should just be a graphical wrapper over it
21:23:07flaviuIMO at least
21:23:14filwitnimrod is not an ide..
21:23:26flaviuThe compiler
21:23:47renesacnimrod is not an ide...
21:24:00filwiti'm not sure what you're trying to say, flaviu
21:24:23Araqrenesac: when editors can show me 'x.setLen ' as a suggestion that's much more useful than being able to write 'x.len = 8'
21:24:34Araqyour point is valid of course
21:24:57Araqbut at this point we can easily get much more bang for your work
21:25:13filwitAraq: sorry, not trying to butt into a conversation, but 'x.len' could be highlighted as both a getter/setter in intellisense
21:25:27filwitAraq: and having 'setLen' is a bad standard, IMO
21:26:24flaviuIDEs typically do stuff like parse the source and that allows them to do all sorts of fancy things. In nimrod, the compiler does all the parsing and the IDEs just have to query the compiler for everything that isn't trivial.
21:26:24flaviuFor example, in the Java world, each IDE has its own parser and its own AST structure for the language. In nimrod, the compiler should do all that.
21:26:42renesacfilwit, it is not a private conversation, fell free to give your input
21:27:10renesacflaviu, nimrod has the 'idetools' so yes, an *IDE* can call the compiler for many things
21:27:53renesacbut for simple syntax highlighting, for example, there is no need for that
21:28:06renesacthankfully
21:28:38filwitflaviu, nimrod's design here is good, but it doesn't stop programmers from having existing preferences in editors, and AST comments makes supporting those slightly more difficult in one aspect
21:30:05flaviurenesac: Yes, the nimrod grammar is simple enough for that.
21:30:05flaviufilwit: Ok, add an option to idetools to strip comments from any AST communicated. Same effect, also allows for who wants the comments to get it.
21:30:07BitPuffinwat
21:30:12BitPuffinnimrod is the IDE?
21:30:25EXetoCthere's idetools
21:30:32BitPuffinah
21:30:32BitPuffinyeah
21:30:35BitPuffinbut that's not an IDE
21:30:49filwitflaviu, you're missing my point i think. Supporting Kate, for instance, has nothing to do with Nimrod's idetools.
21:30:56BitPuffinfowl: did you mean this friday or the next?
21:31:06flaviuBitPuffin: Sorry, bad word choice
21:31:09filwitflaviu, you don't need to use idetools at all for most editors basic highlightings and stuff
21:31:32superfuncFor most, I'd figure you just set up a keyvalue type file
21:31:47renesacfilwit, btw, did you manage to make the errors and warnings from the nimrod compiler show in the apropriate tab on kate?
21:31:50filwitflaviu, it's true that AST comments only really make "block commenting" hard for random text-editors to do on Nimrod code, but that's pretty common
21:32:02renesacor you have aways to go to the output tab?
21:32:52filwitrenesac, hmm... i'm not sure what you're asking. I never did anything with errors/warnings in Kate
21:33:07filwitrenesac, i also just use a terminal
21:33:15renesacoh, right
21:33:22filwitalways**
21:33:39renesacI was using the build plugin
21:34:16filwitKate just received full D intellisense support tho. perhaps i will take a look at how that's done and see if it can be adapted to Nimrod at some point
21:34:27Demoshoenstly I feel like AST based comments are neat, but I do not see any possible use for them that is not totally fucked up. Now having doc comments be part of the AST is a good idea
21:35:19DemosI looked at visual D, and python tools for visual studio. They were totally ad-hoc and hacky and consisted of totally HUGE amounts of code. It really feels like the VS extension APIs were designed by interns
21:35:49flaviufilwit: I'm not sure I understand, the internal representation of the AST in the compiler shouldn't matter if you aren't using idetools.
21:35:49flaviuAre you trying to say that editors have a hard time figuring out how to indent comments?
21:36:08filwitflaviu, yes exactly
21:36:33filwitflaviu, most editors have "place comment block (#) before or after whitespace"
21:36:50renesacremoving the comments from the AST will probably lower the compiler memory usage a bit
21:36:52filwitflaviu, but that breaks compiling in Nimrod cause the comments are part of the AST
21:37:28renesacnot that it is a real problem now
21:37:29Demosfilwit: any code that depends on regular comments being part of the AST deserves to be broken
21:37:32filwitflaviu, so you can support block-comment functionality easily for Nimrod like you can for other languages (only in this area)
21:38:34filwitDemos, well i was never against them being part of the AST really... i mean, what's the difference? It's just that because of text-editor support, IMO, it's best to just remove them since they don't add much
21:38:46Demosyeah
21:39:43filwitflaviu, cant** support....
21:39:53flaviuI'd use the word block-indented, but I get what you're saying. You could get rid of that part of the grammar though and still keep them in the AST, but it'd be more work.
21:40:45filwitflaviu, i'm talking specifically when you select a large chunk of text, and hit a shortcut to comment the whole block in/out
21:41:06*uvelichitel joined #nimrod
21:41:45flaviu filwit: I understand what you're saying now
21:42:01fowlis anybody against making tables nil tolerant? tab[key] = x would initialize tab and tab[key] would return the default value
21:44:46flaviuShould `macro foo(a: static[int]): stmt` work or am I misunderstanding static?
21:47:40filwitflaviu, dunno, but there's also `macro foo(a: int{lit}): stmt`
21:51:04filwitflaviu, take a look at http://build.nimrod-lang.org/docs/manual.html#parameter-constraints
21:51:12filwitif you haven't already seen it
21:51:26filwitnot sure that's the best way to achieve what you're after
21:52:17renesacfowl, python has a separate 'defaultdict' for it
21:54:01*ehaliewicz quit (Remote host closed the connection)
21:57:41fowlrenesac, not the same thing, its initialized when you call defaultdict() or w/e to create it
21:57:54*Skrylar shaves more yaks
21:58:27reactormonkAraq, ah fuck.
22:01:12flaviufilwit: Yes, that's it, thanks
22:07:03flaviuActually, the exact same issue with the same stack trace arises
22:08:36filwitprobably a bug with static[T] stuff then, idk
22:08:57filwitlast i heard, static[T] was still buggy
22:12:45renesacfowl, I'm not sure if I understood what you said, but you need to declare a dict or a defaultdict(type)
22:12:47renesacanyway
22:13:30renesacwell, nimrod tables must be of a certain type, I guess, so it don't have the same problem of python's normal dict, it could work like defaultdict
22:13:44renesacthe problem is breaking backwards compatibility
22:14:03renesacthere might be code out there that expects an exception in those cases
22:14:35flaviuHmm, it also fails if there is no static involved. I guess that's bug.
22:17:01flaviuIt also might be that I forgot to type cd :\
22:18:18OrionPKhows that allegro stuff coming? :D
22:26:49*nequitans quit (Ping timeout: 252 seconds)
22:26:56dom96reactormonk: Do you want to fix $ for floats?
22:30:38reactormonkdom96, not right now I gotta say
22:30:45fowlrenesac, i want to be able to do this: var x: TTable[string,int]; x["hi"] = 4
22:31:07dom96reactormonk: can you give me a link to the commit that changes it so that I can take a look?
22:31:09renesacyeah, I understood
22:31:26flaviudom96: git bisect
22:31:28renesacand I agree that it is a better default
22:31:33fowlrenesac, in python there are no types so you cant really have a nil defaultdict
22:31:41reactormonkdom96, I basically reimplemented it, there's not much to see
22:31:45reactormonkdom96, otherwise, git blame does help
22:32:00dom96reactormonk: Yeah, if I knew which line you changed.
22:32:40renesacfowl, there are types, but it is normally duck typing. An default dict is initialized with 'defautdict(int)' for example
22:33:28fowlyou dont get what im saying still but it doesnt matter
22:33:41dom96reactormonk: I guess it's https://github.com/Araq/Nimrod/commit/4b09baa0a030d899b7e75bb81828e0d9df90ce32 and https://github.com/Araq/Nimrod/commit/33fcd112360c60078ae7ee4ddb93cbe9f44393bd
22:34:14renesacfowl, but what you suggest would break backwards compatibility, right?
22:34:21dom96flaviu: too slow :P
22:35:05fowlrenesac, no, currently you get a segfault, cant recover from that
22:35:37reactormonkdom96, yup
22:35:42renesacoh, now I understood
22:35:49reactormonkdom96, and I take all the blame for not testing :-/
22:35:58dom96reactormonk: happens to the best of us
22:36:04renesacyou want it to be initialized at first insertion, like seqs do now
22:36:08reactormonkand I feel bad because I always urge people to... Maybe because I know how bad it will hurt ^^
22:36:19renesacthe entire dict
22:36:22renesac*table
22:36:42fowlrenesac, yea
22:37:06*renesac haven't used nimrod TTables yet
22:37:21reactormonkrenesac, *hasn't :-P
22:37:48reactormonkdom96, I think the ruby float formatting is quite good
22:37:57reactormonkbut it's its own implementation :-/
22:38:06renesacreactormonk, -_-' I never know the difference
22:38:17dom96reactormonk: How does it work?
22:38:43reactormonkrenesac, third person singular
22:38:48reactormonkdom96, let me see
22:38:54dom964.5 -> 4.5, 4.5555 -> 4.5555 etc. ?
22:39:15*shodan45 quit (Quit: Konversation terminated!)
22:39:23renesacwell, as aseq.add() now initializes the seq if empty, and the relative overhead for this is bigger than on a hash table, I guess this change is probably the future
22:40:09reactormonkdom96, http://lpaste.net/102896
22:40:35dom96lol no way.
22:40:44flaviureactormonk: What does it do that looks nice?
22:40:47reactormonkdom96, yup, it's a bit more complicated.
22:40:47dom96reactormonk: Can you give me some examples of the output?
22:40:51reactormonkdom96, coming
22:41:03*xenagi joined #nimrod
22:41:09reactormonkdom96, gimme a few numbers and I can punch them for you
22:41:36flaviureactormonk: I have a ruby repl open, I see nothing special
22:41:42reactormonkflaviu, that's the point.
22:41:48*xenagi quit (Client Quit)
22:41:59*uvelichitel quit (Quit: Textual IRC Client: www.textualapp.com)
22:42:03renesac0.1 + 0.1 + 0.1
22:42:05reactormonkflaviu, the previous one was just .16f, which is just all-in-your-face
22:42:11dom96I guess I can play around in try ruby
22:42:14reactormonk0.30000000000000004
22:42:16reactormonk^^
22:42:19reactormonkdom96, use `pry`
22:42:20renesacright
22:42:23renesacequal to python
22:42:27reactormonkor `irb` if you don't feel like installing gems
22:42:28*xenagi joined #nimrod
22:42:41dom96reactormonk: I'm on Windows...
22:42:56flaviudom96: You need some linux
22:42:59fowlpray for him
22:43:02dom960.1*0.1
22:43:03dom96=> 0.010000000000000002
22:43:18dom96Doesn't look so nice...
22:43:23reactormonkdom96, that's just sucky floats
22:43:33flaviuwould you rather it lie to you?
22:43:48fowltry 1/10
22:43:50reactormonkit should be better than plain .16f
22:43:52fowllol
22:43:58reactormonkfowl, that's 0
22:44:09dom96why is that 0?
22:44:42flaviudom96: int division
22:44:58*Matthias247 quit (Read error: Connection reset by peer)
22:45:05dom96ahh
22:45:09flaviuhe should have done 1.0/10 or 1/10.0, most languages don't force division to float like nimrod
22:47:15BitPuffinhttp://www.ibm.com/developerworks/aix/library/au-multithreaded_structures1/index.html should be an interesting read
22:47:26BitPuffinnd http://www.ibm.com/developerworks/aix/library/au-multithreaded_structures2/index.html
22:47:31reactormonkflaviu, it's 0.1
22:48:26renesachttps://groups.google.com/forum/#!msg/ruby-core-google/oWWhfY-XgKY/fnAmr_5_SrgJ <-- some more examples on rounding
22:52:02renesacwe should really have settled on an octal/hexadecimal numeral system
22:52:03renesac:P
22:54:13renesacthe java example is using a bigDecimal, not a float or bigFloat
22:54:23renesacso it can get the rounding right
22:55:08*DAddYE quit (Remote host closed the connection)
22:55:36*DAddYE joined #nimrod
23:04:01flaviuI guess the docgen only runs before macro expansion?
23:04:07renesacwow, division latency is huge
23:04:37renesac26 cycles for 32bit, 92 for 64bits on a sandy bridge
23:04:50renesac45 and 77 for a K10
23:04:57flaviuFloat division?
23:05:08renesacinteger division, I think
23:05:10renesacdiv
23:05:19renesacyeah, integer
23:05:36renesacon atom it is 50 and 191
23:05:47renesacan L1 cache miss is much better than that
23:05:54flaviuCan you compare it to C?
23:06:00renesac?
23:06:12renesacI'm talking about CPU instruction latency
23:06:41Demosyeah division is heavy, everything else is not so bad
23:06:52renesacyeah
23:07:14flaviuoh, ok. But compilers can optimize lots of division to multiplication
23:07:21renesacmultiplication is 3~4 cycles
23:07:26renesaclatency
23:08:04Demosalthough I suspect that miss in L1 could be somewhat more costly than just the miss if there are data dependencies on that load
23:08:14Demosor rather is later instructions depend on that load
23:08:16EXetoCflaviu: not doc2
23:08:17renesacon an atom it is 5~18 cycles latency for multiplication
23:10:00flaviuEXetoC: doc2 crashes for me with my complicated macros
23:10:43EXetoC:/
23:10:57renesacDemos, I was comparing the L1 miss with division
23:11:04DemosI know
23:11:35renesacit might be better to fetch a table in L2 than do a division
23:11:49renesacespecially for 64bit
23:12:15Demosagain, if you have subsiquent instructions dependent on the load the CPU may have to stall
23:12:33Demosalthough I guess that is true if you have intructions dependent on the div as well
23:12:38renesacexactly
23:12:45renesacthat was my comparison
23:13:29Demosstill you should just profile and then find out what is actually happening, the CPU can tell you "hey I am doing all these divs, stahp"
23:13:40renesacI just watched last week the series of talks about the Mill CPU
23:13:59renesacso I was curious about those instructions latencies in normal cpus
23:14:40renesachttps://www.youtube.com/playlist?list=PLFls3Q5bBInj_FfNLrV7gGdVtikeGoUc9
23:15:07Araqfowl: I'm against making tables nil tolerant
23:15:15renesacif you don't want to see 10+ hours of talks, this is a nice summary: http://ootbcomp.com/topic/introduction-to-the-mill-cpu-programming-model-2/
23:16:35renesacif you want to see the talks, I suggest starting with the second one
23:16:59BitPuffinDemos: does eigen do vector addition by mutating one of it's parameters?
23:17:13renesacthe slides are much better and you don't really need the first one to understand it
23:17:34DemosBitPuffin: well if you say auto c = a+b a and b stay the same
23:17:34renesache repeats lots of things at the start of each talk too
23:17:44Demosif you say a = a + b it will probably mutate a
23:18:04renesacAraq, why, if seqs are now nil tolerant?
23:18:27BitPuffinDemos: hmm, well yeah ofc a = a + b would mutate
23:18:46Araqa TTable is no hidden pointer, it's an object. it can't be nil anyway
23:18:52BitPuffinbtw does a += b and a = a + b generate the same ast in nimrod?
23:19:05Araqbut ok, the underlying seq does
23:19:13AraqBitPuffin: no way, that would be insane
23:19:17BitPuffinDemos: I'm considering changing linagl to define a + b in terms of a += b
23:19:35BitPuffinalthough I'd have to benchmark to see what's faster
23:20:19BitPuffinie proc `+`(a, b) = result = a result += b
23:21:22BitPuffinand have `+=` be proc `+=`(a: var TVector, b: TVector) or something
23:21:26BitPuffinagain
23:21:31BitPuffinwould have to see what's faster
23:22:00BitPuffinthen since a = a + b != a += b I guess I'd have to fix that with a macro
23:22:11BitPuffinTRM
23:22:27fowlAraq, yet you get a segfault when you dont initialize it. my main dislike for tables is that i have to repeat the type when i initialize it, i cant just do tab.init
23:22:53dom96fowl: You don't have to repeat: var x = initTable[string, int]()
23:23:35fowldom96, if its in an object
23:23:57BitPuffinAraq: do you think that would perform better than defining a += b to be a = a + b ?
23:24:22dom96fowl: I see. Type inference isn't trivial.
23:25:05fowldom96, its just a matter of defining init[k,v](t:var ttable[k,v])
23:25:52dom96define it then
23:26:21fowland possibly have a pr rejected? my vanity!!
23:27:22Araqfowl: ok, allow 'nil' for TTable for consistency
23:27:31Araqbetter than 'init' crap
23:28:06DemosBitPuffin: you should not take Eigen doing any particular thing to be an indication of it being faster. Eigen does some /really/ clever metaprogramming to do lazy evaluation so that it can make less copies
23:28:47*darkf joined #nimrod
23:29:07Varriount|Mobilefilwit: I saw your mockups for the new website, forums, and documentation, I think
23:29:38AraqVarriount|Mobile: which link exactly did you click to get mingw64?
23:29:39DemosAraq: how does nimrod deal with integer overflow?
23:29:59EXetoCit *might* raise an error
23:30:10AraqDemos: raises an exception in debug mode
23:30:21Araqin release mode it's undefined behaviour
23:30:47renesacand with unsigned numbers, it wraps around
23:31:08Araqwhere "undefined behaviour" means not quite the same as in C
23:31:09renesacor when using the unsigned (+%) operators
23:31:27NimBotAraq/Nimrod devel 00dc93b Dominik Picheta [+0 ±1 -0]: Fixes collections/ttables.
23:31:27NimBotAraq/Nimrod devel 20e3ab7 Dominik Picheta [+0 ±1 -0]: Improves tobjasgn test.
23:31:27NimBotAraq/Nimrod devel 1465355 Dominik Picheta [+0 ±1 -0]: Disabled tgtk test.
23:31:49DemosAraq: how is it different?
23:32:01*nequitans joined #nimrod
23:32:28Varriount|MobileAraq: http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download
23:33:01Araqthe compiler is free to optimize it without caring for overlfow, but at runtime it must either wrap around or saturate or raise an exception
23:33:12Araqwell ... not really different from C I guess
23:33:25Araqbut it can't crash with a segfault
23:34:01Araq"undefined behaviour" in C is allowed to format your harddisk or something
23:34:09BitPuffinhahahha
23:34:23Demosgcc actually will launch nethack if you use the right pragmas
23:34:27Demosjust because it can
23:34:59DemosAraq: can I turn on overflow checks in a module if I want them?
23:35:03BitPuffinDemos: hrm, I wonder if I could do that in linagl without losing its flexibility
23:35:08Varriount|MobileI have to wonder how things today would be if saturated integer arithmetic instead of overflow were the norm.
23:35:09AraqDemos: of course
23:35:18DemosBitPuffin: yes, but do not do it now
23:35:24Demosit would be a /lot/ of work
23:35:29BitPuffinyea
23:35:37BitPuffinwell
23:35:44Demosand chances are it would break the compiler
23:35:53BitPuffinI'm just thinking if it's faster to define += in terms of + or + in terms of +=
23:35:56BitPuffinor if it even matters
23:36:03BitPuffinDemos: linalready breaks the compiler
23:36:19Demosheh true
23:36:22Demosso does vecmath
23:36:33Demosit does not matter
23:36:43BitPuffinvecmath=
23:36:44BitPuffin?
23:36:58Demosmy linear algebra library, not on babel or anythong
23:37:01Demos*anything
23:37:23BitPuffinaha
23:37:28BitPuffinwell how do you cope
23:37:32BitPuffinbecause I get depressed xD
23:38:06BitPuffinerr
23:38:22BitPuffinreactormonk: shouldn't you show a little bit more of an example in your latest bug report lol
23:39:02*superfunc quit (Quit: Page closed)
23:40:26BitPuffindoes the manual tell me which will be evaluated first in a * b * c
23:41:51BitPuffinah
23:41:54BitPuffinleft associative
23:42:05BitPuffinunless rel char is ^
23:42:51BitPuffinDemos: doesn't that mean that with your silly col majorness you have to do C*(B*(A*v))
23:42:58BitPuffinor wait
23:42:59BitPuffinno
23:43:01BitPuffinyou don't
23:43:04BitPuffinwhat am I thinking
23:43:33Demosyou do know that matrix multiplication is associative right?
23:44:24BitPuffinDemos: right associative? or why did you swap the position of "right"
23:44:52DemosI accedently a comma
23:44:57Varriount|MobileSpeaking of matrix multiplication, the python devs recently accepted a PEP to introduce matrix multiplication operators.
23:45:17BitPuffinVarriount|Mobile: what did they say?
23:45:37EXetoChuh
23:45:37Demosthey are using @ right?
23:45:45EXetoCsuch specific operators
23:46:02Varriount|MobileThey accepted. It was kind of a strong-armed into action thing
23:46:07BitPuffinmatrix mul doesn't have specific operators
23:46:37Varriount|MobileA surprisingly large amount of python's userbase is with science and numerics
23:47:25BitPuffinwait
23:47:29BitPuffinwhat am I thinking
23:47:30xenagino, you wait
23:47:34xenagi:P
23:47:51BitPuffinassociativity won't matter
23:48:01*BitPuffin slaps xenagi with a sphincter
23:48:09Varriount|MobileA bunch of people from the various major numeric python packages basically presented the pep and said "We make up a huge part of the community, here's a feature we need along with the logic behind it, make it so"
23:48:29BitPuffinVarriount|Mobile: well matrix mul is written as AB
23:49:19BitPuffinor wait
23:49:21BitPuffinit will matter
23:49:22BitPuffinXD
23:49:42fowli am currently trying to merge roids into flaming-nemesis
23:49:50xenagipretty sure it matters, BitPuffin
23:49:54fowlthat project needs a name >_>
23:49:56BitPuffinit will indeed
23:50:12xenagithough, I have yet to open up that book "The Manga Guide to Linear Algebra" :P
23:50:22BitPuffinDemos: did you mean commutative when you said associative
23:50:27Demosno
23:50:30BitPuffinbecause that would be false
23:50:31DemosI meant associative
23:50:45DemosA(BC) = (AB)C
23:50:54Demosif we ignore floating point
23:50:57BitPuffinah
23:51:01BitPuffinyou meant like that
23:51:04BitPuffinwell then I gotcha
23:51:23xenagiBitPuffin, what'cha coding?
23:51:25BitPuffinshould have understood immediately
23:51:29BitPuffinjust a bit rusty
23:51:34BitPuffinxenagi: updating linagl
23:51:56BitPuffinand I started worrying about the associativity
23:54:53DemosI dont think static[T]s work yet...
23:55:45BitPuffinDemos: they don't
23:55:54BitPuffinDemos: I am adding linagl/boring
23:56:07filwitis 'bind' no longer needed for templates which expose private module symbols?
23:56:38Araqfilwit: yes, 'bind' is obsolete
23:56:51filwitAraq: nice
23:57:13flaviufilwit: Unrelated to what you're doing ATM, but can you include breadcrumbs in the new design?
23:57:41filwitAraq: well templates seem to work nicely for my global calling syntax, but i still have one more issue with OOP macros (haven't tried in awhile tho) which is the exposure symbol *
23:58:04filwitflaviu, sure that sounds fine, but on which design.. the docs?
23:58:04BitPuffinoooh
23:58:05flaviuMy biggest gripe with the UI now is that I have to manually edit the url to move back to the main page or the documentation page
23:58:09BitPuffinwould be sweet to have nimcss
23:58:30flaviufilwit: Yes, something like Home>Docs>Libraries>System
23:58:41BitPuffina CSS generating DSL that takes care of platform specific bs :D
23:58:44BitPuffinwell
23:58:46BitPuffinbrowser specific rather
23:58:55filwitflaviu, okay thanks for the feedback, but let's nitpick the design (especially the docs) when there's actual HTML to go over
23:59:10filwitflaviu, but that does sound like a good idea
23:59:17BitPuffinlol, cat
23:59:21BitPuffinway to be dramatic
23:59:58flaviuOk, sure. I'll mention it again next time you ask for feedback