<< 05-01-2014 >>

00:17:53*io2 quit ()
00:21:11*Demos_ joined #nimrod
00:27:06*BitPuffin joined #nimrod
00:27:18BitPuffindom96!!!!
00:27:21BitPuffindom96???
00:27:28BitPuffindom96!?!?!?!?!
00:37:28Demos_wow divide by zero error in the compile, well done microsoft
00:38:47Demos_actually this could be real invalid code
01:08:47Demos_anyone know a way to generate a pdb file without defeating microsoft's compiler?
01:12:01Demos_Varriount, I just tried building devel on windows, got the same range error as you did
01:47:16*shodan45_ quit (Read error: Connection reset by peer)
01:47:26*shodan45_ joined #nimrod
01:50:14*shodan45 joined #nimrod
01:50:14*shodan45_ quit (Read error: Connection reset by peer)
01:56:32*shodan45 quit (Quit: Konversation terminated!)
01:56:46*shodan45 joined #nimrod
02:01:31*shodan45 quit (Client Quit)
02:01:46*shodan45 joined #nimrod
02:03:33*shodan45 quit (Client Quit)
02:03:41*shodan45 joined #nimrod
02:09:41*shodan45 quit (Read error: Connection reset by peer)
02:09:49*shodan45 joined #nimrod
02:17:37*shodan45 quit (Read error: Connection reset by peer)
02:17:45*shodan45 joined #nimrod
02:26:05*shodan45 quit (Quit: Konversation terminated!)
02:26:10*shodan45_ joined #nimrod
02:28:53*shodan45_ quit (Read error: Connection reset by peer)
02:29:12*shodan45_ joined #nimrod
02:38:12*shodan45_ quit (Quit: Konversation terminated!)
02:38:23*shodan45_ joined #nimrod
02:39:42*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
02:52:37*brson quit (Ping timeout: 272 seconds)
02:54:16*brson joined #nimrod
03:15:02*PortablePuffin quit (Read error: Connection reset by peer)
03:15:32*shodan45_ quit (Quit: Konversation terminated!)
03:15:40*shodan45 joined #nimrod
03:18:30*PortablePuffin joined #nimrod
03:20:21*shodan45 quit (Client Quit)
03:20:31*shodan45 joined #nimrod
03:50:32*brson quit (Ping timeout: 260 seconds)
04:20:27*DvorakDude joined #nimrod
04:20:33*DvorakDude left #nimrod (#nimrod)
04:35:47*PortablePuffin quit (Ping timeout: 245 seconds)
04:38:45*BitPuffin quit (Ping timeout: 272 seconds)
04:40:21*PortablePuffin joined #nimrod
04:46:30*shodan45 quit (Quit: Konversation terminated!)
04:56:56Demos_if I have some type TThing and I have a ptr TThing and some functions that take a ref TThings is there anything I can do to call those functions with my TThings?
05:01:23*psquid joined #nimrod
05:09:42wanAn empty subscript [] notation can be used to derefer a reference
05:10:09Demos_yes, I know
05:10:20Demos_but it can not go from a ptr to a ref
05:10:29wanoh, ref
05:10:48wanoverload?
05:11:08Demos_I can't change the functions in question
05:11:30Demos_I can reimplement them, but that is less than ideal
05:22:37wanvar my_little_ref = cast[ref TThing](my_little_pointer)
05:22:58wanIt should do the trick
05:23:41*Mordecai joined #nimrod
05:23:49Demos_yeah, except then the gc would try and free it when the function returned
05:24:13wanWould it? It belongs to the upper scope.
05:24:21Demos_the ptr does
05:24:31Demos_no it would free it when the caller returned
05:25:27Demos_I was just using refs for everything but stopped as I needed more control, I think I may have been loosing track of a ref
05:26:00Demos_I am passing these pointer to c# and letting the .net gc call a free function in the finalizers
05:26:14wanYeah, but refs in args mean you 'borrow' from the upper scope so that you don't have to copy a whole TThing, no ? I don't think the function you call with a ref would free that ref.
05:27:15*psquid quit (Ping timeout: 272 seconds)
05:30:17Demos_no, but once the calling function returned that ref WOULD be free. And the nimrod compiler can decide to take things by pointer if you just pass the value type
05:30:44Demos_one of the resaons why proc(a: int) = a + 1 is invalid code
05:39:21fowlwan, ref in nimrod is a garbage-collected pointer, pass-by-ref is called "var"
05:41:47wanIs there a difference for the function to call?
05:43:27*[1]Endy joined #nimrod
05:44:00*Demos__ joined #nimrod
05:44:28wanDoes nimrod then triggers a registration with the GC if you cast a ptr as a ref and then pass it around?
05:44:52*ddl_smurf quit (Quit: ddl_smurf)
05:47:31*Demos_ quit (Ping timeout: 272 seconds)
05:54:14Demos__it may, and if it does the bug could be quite hard to detect
05:54:44Demos__and fowl isn't nimrod's "pass by val" actually pass by const val or by const ref
06:03:18fowlmaybe
06:04:23Demos__I think the compiler has that freedom, but I have no idea if it actually uses it
06:32:08*girvo joined #nimrod
06:46:50*girvo quit (Quit: My iMac has gone to sleep. ZZZzzz…)
06:57:43*girvo joined #nimrod
07:01:53*girvo quit (Client Quit)
07:08:12*girvo joined #nimrod
07:30:19*[2]Endy joined #nimrod
07:33:50*[1]Endy quit (Ping timeout: 264 seconds)
07:55:07*girvo quit (Quit: My iMac has gone to sleep. ZZZzzz…)
08:54:21*Demos__ quit (Ping timeout: 272 seconds)
09:11:46*Demos__ joined #nimrod
09:35:36zaharyVarriount: my faulty commit looks rather innocent, but I'll try booting on windows today
09:38:12*Demos__ quit (Ping timeout: 245 seconds)
09:57:59zaharyAraq, you requested the not types when I first implemented tfAll and tfAny - I have the IRC logs to prove it :P
09:59:09zaharyanyway, I added them for completeness, because they were quite easy to add to the current infrastructure - maybe someone could make use of types like "not Serializable"
10:11:59*zielmicha1 joined #nimrod
10:14:36*zielmicha quit (Ping timeout: 260 seconds)
10:15:03*zielmicha8 quit (Ping timeout: 272 seconds)
10:17:57*exhu joined #nimrod
10:18:22exhuhi
10:19:10exhuwho is in charge of https://github.com/nimrod-code/cairo/issues/1 ? Please commit this line.
10:20:00*gradha joined #nimrod
10:20:14exhuand maybe someone can help with http://forum.nimrod-lang.org/t/333
10:33:51*fntzr joined #nimrod
10:34:27exhuhi Araq
10:35:08gradhaexhu: replied http://forum.nimrod-lang.org/t/333/1#1734
10:36:00Araqhi exhu, gradha's answer is correct
10:36:10exhuThanks guys!
10:36:12Araqhi fntzr welcome
10:37:08Araqexhu: I think the cario wrapper gets rid of the cairo_ prefix
10:37:19Araqand maybe also of the surface_
10:37:43Araqso, make a consistent pull request please
10:37:55exhuAraq, too bad, it makes harder to refer to the original cairo docs/tutorials
10:38:15Araqnot really
10:38:47Araqyou simply say somewhere "nimrod has modules and as such namespaces and so we got rid of primitive prefixes"
10:39:05Araqand the cario docs even suggest this for wrappers iirc
10:39:50exhuAraq, do only module names get prefixed in binary form? i.e. importing private/mymodule and lib/mymodule can cause name collisions?
10:40:25Araqyeah
10:40:28Araqwell
10:40:35Araqthe rules are rather adhoc
10:40:46Araqthe compiler tries to guess the "package" name
10:41:01Araqbut there is no notion of package in the compiler/language
10:41:48exhuso it's very important to have module names unique
10:42:01Araqit uses the parent directory unless that's some crap like src, private, etc. :P
10:42:44Araqno it's not very important to have unique module names, it's important to have a sensible directory structure
10:43:16exhuAraq, how can i declare an alias for a type, i.e. like typedef in C works?
10:43:29Araqtype Alias = SomeType
10:43:52Araqtype sections give us that feature for free
10:44:39gradhaexhu: your own forum example uses a type alias
10:44:44exhuah, remembered the distinct keyword.
10:44:54exhuit was int32 and int that are distinct
10:45:17exhuthat's why i got confused -)
10:50:26exhui feel lack of package namespace and visibility rule, i.e. i want a private api between package modules to see each other and have a public api which does not include low-level stuff
10:51:13exhuan asterisk makes package-private functions and types visible to package users
10:51:44gradhawrap your group of interconnected modules through a public single module
10:52:13exhugradha, you mean via 'include' ?
10:52:39gradhaif you have modules P1, P2, P3, create API and import P1, P2, P3 from API
10:53:01gradhapeople importing API will see only what you want, though I guess they can still import manually Px
10:53:52gradhabut IMHO people concerned about visibility of procs in modules are lousy documentation writers, programmers shouldn't dig into modules source code to figure out stuff
10:54:14gradhayour documentation should be the API, not a .nim file
10:54:16exhucan i simply declare an alias for a proc? like API.sompublicproc = myrpivatemodule.MyProc ?
10:55:16Araqno use 'export' instead
10:55:18gradhanever tried that, but you can export the sumbols you want
10:56:16Araqand btw nimrod's module system has already more features than most if not all other languages out there
10:56:37Araqso it's really annoying people still complain about it
10:58:25Araqthe package stuff is about to distinguish jester/utils from nimgame/utils, not to distinguish private/utils from public/utils
10:58:38Araquse different module names in the same package for fuck's sake
10:58:46Araqhow hard can it be?
10:59:16Araq</rant>
10:59:27*gradha ponders creating a foo babel package depending on bar
10:59:28exhuAraq, i don't mean using same package names in a single package, i mean collisions in different packages
11:01:57exhuAraq, like generating two object files with the same public symbols, e.g. module jester/utils exports "someUtilProc" and module nimgame/utils exports "someUtilProc" and then they get linked...
11:07:46Araqthat's not a problem
11:09:21Araqhow many 'add' procs do you think we have? ;-) we have a good enough name mangling to deal with this problem
11:10:01fntzrAraq, hi )
11:24:15Araqbbl
11:32:06*girvo joined #nimrod
11:40:31*Mordecai quit (Read error: Operation timed out)
11:41:16*Mordecai joined #nimrod
11:48:32*girvo quit (Quit: Textual IRC Client: www.textualapp.com)
11:58:56*exhu quit (Quit: Ex-Chat)
12:30:50*darkf quit (Quit: Leaving)
12:37:42Varriountgradha, I must thank you for informing me about the existance of the 'using' statement via the recent issue you posted.
12:37:56Araqhey, the using statement is new
12:38:07Araqand I'm not sure we should keep it :P
12:38:46gradhakill it with fire
12:38:57VarriountI think it'd be better in block form
12:40:34gradhablock: using x
12:40:45VarriountOf course, I'm neutral as to whether it should stay or go. I haven't had much call to 'use' it yet.
12:45:31gradhaVarriount: https://gist.github.com/gradha/8267759
12:47:00dom96OrionPK: Why not just use nginx's gzip capabilities?
12:47:18dom96I think adding gzip to httpserver would be appropriate, but i'm not sure.
12:47:27gradhaVarriount: I just updated the gist, if you modify it to use the statement keyword instead the compiler complains with a fun message
12:47:39gradhaexpression '(s|a)' has no type (or is ambiguous)
12:47:58gradhaI was going to add that pitfall to the docs soon
12:48:12gradhamaybe I should add my awesome macro too
12:56:36dom96'using' does make more sense in block form IMO. I said that when it was introduced, right now I can't remember what the argument was against my opinion though heh
12:57:31gradhathe argument against that was likely you could not disambiguate conflicting module imports
13:01:12dom96I don't see how not using it in block form helps with that?
13:01:43gradhaif you have a block form, for each "using" you have to indent your whole source one level
13:02:17gradhathe manual example makes it quite clear:
13:02:18gradhaimport windows, sdl
13:02:18gradhausing sdl.SetTimer
13:06:30dom96oh, i see.
13:07:03dom96Well, in that case it should be a hybrid. You should be able to use it in a block form and as a single statement.
13:13:50*PortablePuffin quit (Read error: Connection reset by peer)
13:17:52*PortablePuffin joined #nimrod
13:22:44*Varriount|Mobile joined #nimrod
13:44:59AraqI don't get the example
13:45:07Araq"using sdl.SetTimer" wtf?
13:45:25Araqwe already have from sdl import SetTimer
13:45:54dom96hrm, true.
13:45:59gradhawe will have to ask zahary
13:48:19*BitPuffin joined #nimrod
13:56:43*Varriount|Mobile quit (Ping timeout: 272 seconds)
13:58:38*Varriount|Mobile joined #nimrod
13:58:54*Varriount|Mobile quit (Client Quit)
13:59:16*Varriount|Mobile joined #nimrod
14:00:43Varriount|MobileHow would one go about printing the value in a particular register in nimrod?
14:01:19Araqinline assembler
14:06:22*Varriount|Mobile quit (Remote host closed the connection)
14:14:35*bstrie quit (Ping timeout: 245 seconds)
14:15:35*bstrie joined #nimrod
14:59:36*faassen joined #nimrod
15:02:00BitPuffindom96: ?!?!?!
15:02:22dom96BitPuffin: yes?
15:03:10BitPuffindom96: dota nao?
15:03:46AraqBitPuffin: let's make a deal
15:04:02BitPuffinAraq: deal?
15:04:20AraqI send you the plan, you implement the runtime parts of the concurrency model :P
15:05:01BitPuffinlol ;)
15:05:08BitPuffinlike I have the skillz!
15:06:13BitPuffinAnd if it was fairly trivial then I'd imagine you would have already done it yourself hehe
15:06:27BitPuffindom96: alright too late now I'm gonna play xD
15:06:33dom96bah
15:06:45dom96I should study anyway...
15:06:58Araqbbl
15:07:27BitPuffindom96: or if you get going I'll practice with bots while you prepare
15:07:41BitPuffindom96: no time to think
15:07:44BitPuffinyes or nein
15:07:46BitPuffinja or nein
15:07:58BitPuffinja eller nej
15:08:01dom96nah
15:08:04BitPuffinnub
15:08:06dom96Maybe i'll play later
15:28:49*ddl_smurf joined #nimrod
15:34:14*aftersha_ joined #nimrod
15:34:42*faassen quit (Quit: faassen)
15:57:48*aftersha_ quit (Quit: Computer has gone to sleep.)
16:02:11Araqhmm is it just me or have {.pragmas.} stopped being ugly?
16:02:36AraqI removed the dots to see how the code then looks
16:02:53BitPuffinAraq: I think there is some beauty to it
16:02:53Araqand for some reason {.pragmas.} are sexy now :P
16:03:07BitPuffindom96: I won ;)
16:03:10BitPuffinI played Chen
16:03:20BitPuffinthe ultimate micro manage hero
16:03:23BitPuffinreally annoying
16:03:26BitPuffinbut it went quite well
16:04:00BitPuffindom96: another window for you to join in
16:04:03BitPuffingoing in 10
16:04:09BitPuffin5
16:04:11BitPuffin3
16:04:13BitPuffin2
16:04:15BitPuffin1
16:04:17BitPuffin0
16:04:25BitPuffinokay I'll play another one by myself then
16:04:35Araqcan't you use PM for your gaming arragements?
16:05:01Araqit's becoming annoying
16:05:08*PortablePuffin quit (Remote host closed the connection)
16:15:08*Mordecai is now known as psquid
16:35:03*aftersha_ joined #nimrod
16:46:22VarriountAraq, good morning!
16:47:59*aftersha_ quit (Quit: Computer has gone to sleep.)
16:49:54VarriountAraq, theoretically, is it possible to implement 'using' as a block macro?
16:54:25*fntzr quit (Quit: Leaving)
17:08:03*Demos__ joined #nimrod
17:09:36OrionPKyou mean like a C# style using?
17:10:47AraqVarriount: no otherwise zahary would have implemented it as a macro
17:11:22OrionPKare you talking about using or with?
17:11:40Araqthe question was about "using"
17:12:19OrionPKI thought zahary was implementing a with statement
17:12:34Araqyeah but he called it "using"
17:13:14OrionPKso then my question is did varriount mean C# style using or javascript style with :P
17:13:32Araqour "using" is "with"-like
17:13:41OrionPKyeah
17:13:54Araqand btw JS got it from Pascal
17:14:06OrionPKim sure C# got it from somewhere
17:14:25Araqand I've seen it produce horrible code in pascal hence I'm against it
17:14:41OrionPKits the same story with JS
17:14:53Araqbut then "can be misused" is not really a criterion we care about ...
17:15:21Araq"can be misused" is almost like "can be confusing"
17:18:25Araqso ... after 3 iterations the new thread stuff is so incompatible with the old API that we can simply deprecate everything and move on :-)
17:18:56OrionPKout with the old, in with the new
17:20:09AraqI still hope it works in practice
17:22:34Araqlooks *really* good though :-)
17:23:48OrionPKcant wait to see it
17:24:15AraqI should be done by tonight
17:24:21AraqI know I've said this before :P
17:25:29dom96with the design or the implementation? ;P
17:25:34Araqthe design
17:25:56Araqbut I kept the design implementable
17:28:23Demos__with seems like a bad idea...
17:29:35AraqDemos__: to answer your question, the compiler already makes use of the fact it's allowed to pass by "const&"
17:30:00Demos__wow, kinda an old question but thanks
17:30:07VarriountAlthough 'using'/'with' seem like nice things, I'm afraid that they probably won't be needed very often (see: the 'do' statement)
17:30:52Araqzahary has lots of meta programming use cases that require 'using' under the hood
17:31:18Araqso we'll have some hard time to argue against it
17:31:56VarriountAraq, the problem with all this meta-programming is that half of it is broken or limited, or verbose
17:32:19Araqhey
17:32:51Araqsaying that is like blasphemy here
17:33:03VarriountAraq, I meant the type-class metaprogramming stuff
17:33:21VarriountNot the 'with' statement, macros, etc
17:33:21Araqwell he's working on it
17:33:29VarriountTrue. *sigh*
17:33:57VarriountI'm just grumpy because I can't build nimrod
17:34:27Araqyeah I can feel your pain
17:34:34VarriountIn other news, Araq, it might actually be possible to implement that file id thing you mentioned.
17:34:44Araqcool
17:35:18Demos__Varriount, I had the same problem as you building devel
17:35:30VarriountThe only.. caveat is that how 'unique' an id is depends on the os and fs
17:35:56Araqer ... what?
17:36:22VarriountOperating System and File System
17:36:39Araqer ... what?
17:36:59VarriountDepending on the two, a file copy or move operation could change file's ID
17:37:23Araqthat's not an issue
17:38:22Araqoh sorry
17:38:44Araqtime machine stroke again
17:38:51VarriountHowso?
17:38:57Araqos.sameFile already exists
17:39:48VarriountTrue. But if we have a working stat() like call, we could just replace sameFile's machinery to use the the proc/type
17:42:25VarriountDemos__, yeah, I read your message last night - apparently some wierd code zahary introduced is getting data types muddled.
17:44:12Araqwell you can always roll back
17:47:07Araqsamefile is the wrong interface though
17:47:22Araqan id can be hashed etc
17:49:46gradhawhat's the equivalent of "\n" for a character other than using the hex code?
17:50:23Araq\L
17:52:38gradhanice, zero hits in the docs
17:53:39Araqand now you know what you have to do
17:53:47gradhasame for \T
17:53:52Araqand now you know what you have to do
17:54:06gradhadoes \L mean different line ending on different platforms?
17:54:12Araqno
17:54:23Araqit's always LF aka binary 10
17:54:39Araq\C is always CR aka binary 13
17:54:56Araq\R is the same as \C iirc
17:55:06Araqbut \F is not the same as \L
17:56:34VarriountYou know, it amazes me how similar Windows API's are to parts of the Posix standard
17:57:02gradhacareful there
17:57:06Araqit amazes me how often windows' API is better :P
17:57:24Araqbut I'm biased
17:57:36VarriountIt's like the designers said "Hey, we should use these parts of posix, but modify them in such a way as to make them difficult to use in cross platform programs"
17:57:51OrionPKlol
17:58:27Araqnah ... I take it back
17:58:34Araqwindows' API is awful
17:59:11Araqbut at least they cared about binary compatibility and defined the numeric values of constants
17:59:39EXetoCVarriount: That would almost be surprising
17:59:46Araqinstead of saying "yeah there is this opaque constant EFOO here, so you can only use it from C"
18:00:36Araq"Or you can write a C program to determine its value"
18:01:22Araq"good luck with that approach for the things we defined as C macros though :P "
18:02:50VarriountFor example, most of the information returned by stat() on posix systems can be gathered by collating the data returned by the GetFileInformationByHandle and GetSecurityInfo
18:03:45AraqVarriount: windows is based on DOS though, not on Unix, so why should they care about Posix? Posix only sets in stone the design mistakes on Unix anyway
18:04:24VarriountAraq, you mean, like horrible naming conventions?
18:04:59Araqit's called prgmmng wtht vwls
18:05:07Araq("programming without vowels")
18:05:16OrionPKthere's a \L ?
18:05:18OrionPKshit
18:05:20OrionPKthat would be nice to know
18:06:21VarriountAraq: Well of course, everyone knows that vowels are an endagered species.
18:07:34VarriountAraq: I"m curious though, what do you feel are the design mistakes of posix/unix? Being around mostly Linux programmers, I've never really met anyone who gave it much criticism
18:07:53Araquh oh not again
18:08:07VarriountHuh?
18:08:09Araqfork() lead to memory overcommitting for instance
18:08:55Araqredirection of stdin/stderr/stdout requires some heavy drinking to get right
18:09:22Araqeven though it's claimed to be the essence of that OS
18:09:40Araqthe sockets APIs are archaic crap
18:09:57BitPuffinAraq: ping me when you publish. I am eager to read
18:10:00EXetoCso that's just an issue with certain shells?
18:10:07EXetoC*not just
18:10:10gradhaVarriount: you already asked the question in previous irc sessions, seems you didn't have enough
18:10:10BitPuffinit's gonna be intersting I am sure
18:10:51Araqthe signal mechanism is ill specified and can be used for subtle attacks
18:11:50Varriountgradha: I like listening to people complain about topics that I have no opinion on. For one thing, it helps prepare me for upcoming problems.
18:12:17VarriountAraq: How do you feel about the Plan 9 os?
18:12:27gradhaVarriount: that only works if you go now to #unix and ask why the windows API sucks
18:12:55Varriountgradha: I already know why the Windows API sucks.
18:13:05Araqthe security model is primitive at best and simply doesn't work for desktops but then so does windows's model
18:14:58gradhaVarriount: opinions are like pokemon, kind of different, and you never seem to collect all
18:15:39Varriountgradha: But each one is special, in it's own unique way.
18:15:43EXetoCAraq: the various shells out there could simplify redirection. or is the problem bigger than that? because those are the only specifics you've discussed IIRC
18:15:51VarriountBesides, I like pokemon.
18:16:08gradhameh, digimon beats pokemon any day
18:16:13AraqEXetoC: just check out osproc.nim (which we still got wrong ...)
18:16:27Araqhas nothing to do with shells
18:16:37Araqbut these would be my next complains
18:16:55Araqstrange quoting rules, strange interaction of features
18:17:06Araqor how about ANSI escape codes?
18:17:18Araqever tried to redirect something that produces colored output?
18:17:58Araqand the escape codes are in a way very typical
18:18:09gradhatalking about colors, there's still no way to deal with color text and c++ people want a standard 2d drawing library
18:18:24Araqbecause Unix has a fundamental problem with *APIs*
18:18:41Araqso they come up with lots of other "protocols" instead
18:18:41Varriount^*Posix
18:19:32gradhasee http://lists.cairographics.org/archives/cairo/2013-December/024858.html and facepalm yourself
18:19:56gradhathere's still no standard way to put a pixel on the screen
18:20:19Araqgradha: yes because that would require an API
18:20:33Araqinstead of dumping crap onto stdout
18:20:37VarriountUgh. C++ api
18:20:43joelmoim reading in the tutorial about templates, how do i use pattern operators https://gist.github.com/joelmo/69aade091324cecbaee6
18:20:46Araqor is it stderr? who knows
18:20:49gradhawell, there's no standard way to put text on the screen either
18:21:05gradhaC really sucks for input/output other than "streams"
18:21:08EXetoCAraq: got it
18:22:01AraqVarriount: and finally package managers really are about patching over the braindead /usr/bin file hierarchy
18:22:06Varriountjoelmo: What is the expected output?
18:22:14joelmoVarriount: 2
18:22:20Araqyes they are also about the dependencies
18:22:24Varriountjoelmo: And what do you get?
18:22:45joelmo1
18:23:16joelmoits in the gist :P
18:23:44Araqjoelmo: bug report please
18:24:08Araqthough it's a strange example and not guaranteed to work
18:24:19AraqI'm curious why it doesn't work anymore
18:24:51joelmoI can post a bug report and link to the gist and the manual
18:25:21AraqI know it's from the manual
18:25:42EXetoCAraq: how would one deal with the upgrading of all packages then? and only those that aren't up-to-date already
18:26:11Varriountgradha: Why would a sane proprietor of standards, seeking something like a standard 2d library, want it to be in C++?
18:26:32AraqEXetoC: a package manager is useful but it's still also a patch over the broken directory hierarchy
18:26:48gradhaVarriount: maybe they enjoy pain, or inflicting it unto others
18:26:52EXetoCright
18:27:27VarriountIsn't c++, like, anathema to standardization efforts? (or at least, interfacing efforts)
18:27:45Demos__well if c++ had proper modules it would be a pretty nice language (unless you like writing tools)
18:28:49VarriountDemos__: It would also be nice if there was some sort of api/abi standard.
18:28:55*gradha PARSING ERROR: nice and c++ found
18:28:57Demos__Varriount, well standardization was so successful that there are like 12 implementations, this causes problems for interfacing. But quite honestly if you want to be easy to interface with you need to be C
18:29:18Demos__well there is a standard API, called the c++ standard library
18:29:29Demos__I don't think a standard ABI is a good idea
18:29:40AraqDemos__: I disagree with you
18:29:43EXetoCgradha: should there really be a standard way for stuff like that? it's C we're talking about
18:29:53Araqthere is plenty of stuff in C that doesn't interface well with other languages
18:30:02Araqyou have to pick of subset of C for that to work
18:30:09Araqsame for C++ really
18:30:24Demos__yeah, that was my point. No matter what you do the subset ends up being more or less the same
18:30:32Araqok the subset is larger for C then for C++ but only because C is smaller language
18:30:50Araq*than
18:31:39Araqand partly the linking technology straight from the 60ies is to blame for that
18:31:51Demos__I partly defend c++ because I have spend so much time in it and I want to feel like that time was not wasted
18:31:53gradhaEXetoC: standards are good if the market itself can't reach a defacto standard, I don't think a 2d api needs that
18:32:15Demos__gradha, I am not so sure
18:33:14gradhaconsider the opengl standard with regards to hardware, it was good when card vendors didn't agree what features should be supported at all
18:33:35gradhaof course, everybody at some point catched up with opengl, and… opengl lagged behind, which is when standards suck
18:33:50Demos__the trouble with graphics is that you end up with group A that is interested in just SCREEN 7 PUT GREEN and grop B that wants as much programmability as possible
18:33:50gradhatwo sides from the same coin
18:34:03EXetoCis it not back on track now?
18:34:20gradhait's far behind DirectX according to people in the know
18:35:00Demos__I was under the impression that GL and DX are pretty much the same feature wise. DX is much less painful though
18:35:00gradhaOpenGLES may play the same role, unifying the API of mobile devices, then preventing them from improving
18:35:45Demos__I think that graphics APIs that know something about the language they are being used from are a good thing
18:35:55gradhaDemos__: I've been told the GL is only equals to DX if you use each card's propietary GL extension, which is another way to say "fuck you standard"
18:36:00Demos__not true
18:36:12Demos__GL4.4 has most everything core
18:36:45Demos__maybe some cutting edge Direct3D 11.2 stuff is missing but that is /really/ cutting edge
18:37:15Demos__now actually getting driver support for GL4.4 is another story
18:37:39Demos__if you use GL4.4 you are pretty much going to only run on windows
18:38:17EXetoCgradha: they didn't agree? are you referring to the fact that there are numerous extensions?
18:38:43EXetoCbecause GL was indeed first IIRC, and then that highly platform-specific API came along
18:40:00Demos__one thing that I like about direct3d is that MS makes zero effort to maintain compatibility between versions, so the whole thing is less ... wierd .. than openGL.
18:40:02gradhaEXetoC: that's what I said, when everybody catched up with GL, it stopped being useful and lagged in progress of features
18:44:30Demos__anyway, back to c++... I think c++ is largely well designed if you ignore the syntax. Considering the goals of the language I think it does pretty well. wrt ABI compat I fear that trying to pin down an ABI just gets you stuff like COM and GObject
18:45:33AraqDemos__: may be surprising for you, but I agree
18:45:39Demos__oh, does anyone have an answer to my question about refs and ptrs?
18:46:04Araqyou can try and cast ptr to 'ref' if the code never invokes the write barrier
18:46:14EXetoCgradha: yeah, and the only competitor now is OS-specific. I strongly dislike that approach
18:47:13Araqyou can compile with -d:useSysAssert and -d:useGcAssert and then you get some nice checking for that
18:47:54Demos__so my actual situation is that I have an object with an "Open" function that returns a ref, and I would rather like to use pointers there, I think I am screwed though. Are there docs for those options?
18:49:15Araqwhy not use GC_ref/unref on the 'ref' immediately?
18:49:45Araqit's the same situation as returning a string as cstring and copying it immediately
18:51:02Demos__that is what I am doing now and my memory is getting corrupted, maybe the problem is elsewhere though
18:51:24Araqyou can compile with -d:useSysAssert and -d:useGcAssert and then you get some nice checking then
18:51:57Demos__if I return a ref TFoo through a C function and treat it as a void* on the other side does that mess up the GC?
18:52:22EXetoCgcAssert is for debugging the GC?
18:52:26Araqno, what does mess up the GC is likely the fact that C# runs your stuff on a different thread
18:52:39Araqand so the GC tracks the wrong stack
18:52:47Araqthat's what I would guess anyway
18:52:58Araqtry GC_disable/enable
18:53:01AraqEXetoC: yes
18:53:10Demos__well I am never passing structures to/from c#
18:53:36Araqstructures seem to be safer than pointers for your use cases though
18:55:14Demos__so c# just keeps an Int32 that nimrod gives it and passes that to nimrod which derefs it and gives me a member. Maybe structures would be better, but some of the structures in question contain stuff like strings and refs
18:55:32AraqDemos__: called 'setStackBottom' ?
18:55:44Araqcause you really should
18:56:04Araqin your C# main
18:57:10*OrionPK quit (Remote host closed the connection)
18:58:04Demos__can not find docs for that function...
18:58:16Araqyeah ... :-/
18:59:14Demos__those assertion options moved me closer to the bug
18:59:47Demos__it would be really nice if c#'s AccessViolationException actually reported the memory location you tried to access
19:01:00AraqDemos__: it's exported as initStackBottom(void)
19:01:17Araqso try to call that please
19:01:38Araqbtw does use Visual Studio threads? I'm sure it does ...
19:01:56Araqyou need to call that in the thread that runs the nimrod code
19:03:02*OrionPK joined #nimrod
19:05:54Demos__I have no idea which thread runs the code. You invoke some OLE related incantations and your code gets called... This is why I kinda wanted to use manual memory
19:06:29Demos__and setStackBottom is apparently exported as nimrtl_setStackBottom according to dependency walker
19:08:28Araqquite possible
19:08:40Araqbut you need initStackBottom
19:09:30Araqwell frankly ... if you don't know which thread runs the code your best bet is to disable the GC and enable it after all is over
19:09:34Araqsad but true
19:10:34Demos__wont that leak memory?
19:11:07Araqyeah but it might be fine, not sure what you're doing
19:13:31Demos__yeah, that "fixed" my problem
19:14:17Araqwell the aggressive GC that's picky about its main stack has its downsides :P
19:14:43Araqyou can also try to link against --gc:boehm
19:15:15Demos__well presumably it is better than the one that is only picky sometimes. What about using allocShared and deallocShared and passing the pointer off to the c# gc?
19:15:34Araqthat's a good idea
19:16:33Araqand that really should work :P
19:18:04*OrionPK quit (Remote host closed the connection)
19:18:56Demos__but I get back into those functions that operate on refs, I could reimplement them but that would just be copy-pasting and changing a ref to a var.
19:20:26Araqwell if you disable the Gc, ref is fine for those
19:21:23Demos__should I reimplement the initialization functions (the ones that go new(result))?
19:24:00Araqif you get rid of 'ref' that's what you need to do
19:25:26*OrionPK joined #nimrod
19:27:28Demos__OK final question: if I allocate something with alloc or allocShared that contains a string or ref and the GC is disabled how do I deallocate it. And if I used allocShared where does the string or ref go?
19:29:06Araqthe Gc doesn't track what's in the memory allocated by alloc, so you need to GC_ref/unref these
19:29:45Araqthe string or the ref always go to the thread local GC'ed heap
19:29:51Araqalways
19:30:12*zielmicha-cloud_ quit (Ping timeout: 246 seconds)
19:30:19*zielmicha-cloud_ joined #nimrod
19:30:28Demos__but if the GC is off than I have no way of ever deallocating the ref or string
19:31:00Araqwell you can always enable the GC and make it perform a cleanup
19:31:50Demos__right, but then I have the same problem with threads
19:32:26Araqwhich problem exactly? disabling the GC solves it
19:33:38Demos__the problem of corruption due to not knowing which thread I am on. And I don't want to just disable the GC and leak memory
19:37:25Araqwell that's a hard problem to solve but not impossible unless VS doesn't even run it always on the same thread
19:37:40Araqthough thinking about it ...
19:37:55Araqwhat's wrong with calling initStackBottom?
19:40:08*OrionPK quit (Ping timeout: 246 seconds)
19:46:44Demos__where is initStackBottom it is not in the index and I cant find it in dependency walker
19:47:20Araqgrep for it, exportc it
19:47:30Araqdocument it
19:48:27Demos__k
19:52:19*Mat3 joined #nimrod
19:52:22Mat3hi all
19:52:38gradhayay
19:53:31*Icefoz quit (*.net *.split)
19:53:32*wan quit (*.net *.split)
19:53:38Mat3hi gradha
19:58:22Araqhi Mat3
19:59:10Mat3hi Araq
19:59:29Mat3how about your documentation effort ?
19:59:47AraqI'm in the 3rd iteration now
20:00:01Araqand things are now really looking good
20:00:13Araqplan to finish it tonight
20:00:35*BitPuffin quit (Quit: WeeChat 0.4.2)
20:02:56*OrionPK joined #nimrod
20:03:34Mat3nice
20:07:15*tumak_ joined #nimrod
20:08:23*tumak quit (Read error: Operation timed out)
20:10:39*gradha wonders if reading about kpop hearing metal is kosher
20:12:56*Mat3_ joined #nimrod
20:18:49*Mat3 quit (*.net *.split)
20:18:57Mat3_is someone here interested in a soft-core for FPGA (my VM design) ?
20:21:59OrionPKi would prefer hardcore
20:23:21*aftersha_ joined #nimrod
20:23:42*OrionPK quit (Remote host closed the connection)
20:25:37*capisce_ joined #nimrod
20:25:38*tumak joined #nimrod
20:33:13Demos__what the fuck
20:36:47*betawaffle quit (Remote host closed the connection)
20:36:50*ddl_smurf quit (*.net *.split)
20:36:51*gradha quit (*.net *.split)
20:37:03*mal`` quit (Read error: Connection reset by peer)
20:37:03*alex_nx quit (Write error: Connection reset by peer)
20:37:05*aftershave quit (Ping timeout: 264 seconds)
20:37:11*eigenlicht quit (Ping timeout: 264 seconds)
20:37:11*tumak_ quit (Ping timeout: 264 seconds)
20:37:19*capisce quit (Ping timeout: 264 seconds)
20:37:20*ponce__ quit (Ping timeout: 264 seconds)
20:37:26*eigenlicht joined #nimrod
20:37:27*Mat3_ interesting insights for a public channel, ehm
20:37:27AraqMat3_: please elaborate
20:37:29Mat3_an FPGA is as much hardcore as an ASIC of course *g*
20:37:36*capisce joined #nimrod
20:37:36*capisce_ quit (Ping timeout: 260 seconds)
20:37:51*alex_nx_ joined #nimrod
20:37:53*mal``` joined #nimrod
20:37:59*alex_nx_ is now known as alex_nx
20:38:17*alphawaffle joined #nimrod
20:38:17*alphawaffle is now known as betawaffle
20:39:10*ddl_smurf joined #nimrod
20:39:10*gradha joined #nimrod
20:39:43*EXetoC quit (Write error: Broken pipe)
20:47:24Demos__I am ddebugging a problem where visual studio crashes if you type a keyword followed by a lowercase l
20:47:43Demos__although it crashes in a whole lot of other circumstances as well, so who knows
20:47:44Araqvisual studio is cool
20:53:40*OrionPK joined #nimrod
20:54:21Mat3_do not know Visual Studio, however working with an effective programming editor like Notepad++ may be an simple alternative for you
20:54:33*OrionPK quit (Remote host closed the connection)
20:54:58*zielmicha8 joined #nimrod
20:55:01*OrionPK joined #nimrod
20:58:09Demos__well I am using notepad c++ but I am debugging code running in VS
20:58:21Demos__VS is not buggy my code is buggy
21:02:00*zauberparacelsus joined #nimrod
21:04:06zauberparacelsusAs far as web microframeworks for Nimrod go, are there any alternatives to Jester? I looked at it, and unfortunately it doesn't fill my needs. Wildcard URL's are a feature that I would need so that I can properly convert my wiki engine to Nimrod.
21:05:33dom96wildcard urls?
21:06:28zauberparacelsusyeah, matching one URL string to potentially many other URLs. Like, for example, if the URL is "/page/1" or "/page/2", then they would all match to "/page/*"
21:06:41dom96You can do that with jester
21:06:51zauberparacelsusreally? The docs said that you can't
21:07:15zauberparacelsusthough, since I now see you're the dev, I'll take your word for it, lol
21:07:37dom96hrm, well I assumed "/page/@page" would fit your needs heh
21:07:46zauberparacelsuslol
21:08:03dom96I just remember that that is one of things from sinatra that I did not implement
21:08:06zauberparacelsusnow, suppose I want to just match all possible URLs to a single pattern?
21:08:18OrionPKcant you use a regex
21:08:21OrionPKgetre
21:08:26dom96yeah, you can use regex
21:08:34Mat3_Demos_: Try fdbg
21:09:24dom96zauberparacelsus: What is that you want to do exactly?
21:10:00dom96*is it
21:10:01zauberparacelsusbasically, my wiki engine, which is implemented in Python and Flask, would match all URLs down to a single route.
21:11:36OrionPKwhy wouldnt a standard pattern work for that
21:11:58*zielmicha8 quit (Remote host closed the connection)
21:12:06*zielmicha8 joined #nimrod
21:12:06dom96yeah, presumably all you need is: get "/@pagename": ...
21:12:12zauberparacelsusdom96: thank you
21:12:37Mat3_ciao
21:12:54*Mat3_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:16:10Demos__ha! found initStackBottom() strange that windows search did not pick it up, but nimgrep did
21:16:43*[2]Endy quit (Ping timeout: 252 seconds)
21:17:11OrionPKwindows search doesn't look inside files, does it?
21:17:36Demos__it sometimes does
21:17:55Demos__oh, I think it just ignores nim files
21:18:45OrionPKyou can set up full text indexes
21:19:13OrionPKI don't think that it's going to search in files ootb tho
21:20:36Demos__yeah, I just added nim to the list of files it will fully index
21:29:55Araqwhy do you use windows search when you can use nimgrep? :P
21:30:09Araqnimgrep is the best tool I've ever used *cough*
21:31:57*EXetoC joined #nimrod
21:36:07*brson joined #nimrod
21:37:12Demos__OK so the way to "take control" of c# gc is with finalizers, they get run a bit before the gc frees memory for an object. It turns out that the thread that the finalizer runs on in unspecified...
21:40:03OrionPKyou're in dangerous territory :P
21:40:24zauberparacelsusare there any YAML parsers for Nimrod?
21:40:27Araqfinalizers in C# and Java are quite slow though
21:40:34OrionPKno zauberparacelsus
21:40:45Araqzauberparacelsus: not that I know of, there are JSON parsers though
21:40:50zauberparacelsusok, thanks
21:40:57Araqand wrapping a C lib is not hard
21:41:05zauberparacelsusyeah
21:41:10Araqif you do that, please put it on babel
21:41:18zauberparacelsusaye
21:41:24Araqso the next time we can answer with "yes" :-)
21:41:31zauberparacelsusyep
21:43:24Demos__yeah, I know they are slow, ima cross that bridge when I get there. And I also know I am in dangerous territory. The fact is that having to manually manage memory from an unmanaged heap even though you have a GC just sitting there is dumb, hence finalizers
21:43:51Araqsure, I would use them too
21:44:33Araqjust sayin' that the nice generational copying collection GC has its downsides
21:44:50OrionPKso anyone want to try out a windows build of irc familiar
21:45:03Araqbecause if you copy what's alive, you don't really know what's dead
21:45:15Araqand so finalizers start to get really expensive
21:46:14zauberparacelsusare there any guides for creating bindings to C libraries?
21:46:28Demos__well yes, but c# does not care. c# is about getting somewhat decent performance without much effort
21:46:45Demos__http://lucumr.pocoo.org/2013/8/18/beautiful-native-libraries/
21:48:43OrionPKhttps://dl.dropboxusercontent.com/u/417554/ircfamiliar.zip
21:53:48gradhahttp://cbloomrants.blogspot.com.es/2013/12/12-31-13-statically-linked-dll.html
21:56:17OrionPKjesus christ gradha
21:56:21OrionPKare you trying to get us all killed
21:57:28Araqoh god
21:57:31Araq" Because DLLs are also an annoying disaster on Windows (having to distribute multiple files, accidentally loading from an unexpected place, and what if you have multiple products that rely on different versions of the same DLL, etc.). "
21:57:48Araqdoes the guy even know how DLLs work on windows? o.O
21:58:12Araqit's dead simple to use multiple different DLL versions ...
21:58:27Araqfrom multiple products at least
21:58:49Araqheck, I can still run all my windows software everywhere including on wine
21:58:57Araqtry that with a linux binary
22:06:14Demos__well that is only because everyone distributes the windows dlls with the application
22:06:27Araq*shrug* it works
22:07:00Araqand it works since decades
22:07:40Demos__but it is strictly worse than using static libs, since you get none of the benefits of dynamic libraries
22:08:15Araqperhaps but it *works* :P
22:08:44Demos__true
22:08:45Araqwindows is the only OS which really cares about to keep running your software
22:10:14Araqand most DOS based games are more portable than the average JVM software thanks to dosbox
22:11:02Araqthe morale of the story is: if your software is valuable, it's portable soon enough
22:11:13gradhadoes dosbox support now 32bit mode?
22:11:27VarriountOrionPK: Just downloaded ircfamilier. Chrome says that it is "a potentially dangerous file"
22:11:33AraqI think so, gradha
22:11:34Varriount:O
22:12:45VarriountI really wish you could restrict a program's file access in a fine-tuned way..
22:13:04Araqgradha: I used to run warcraft 1 on it which is a 32bit application
22:13:41gradhait depends on the mode, I remember not being able to run any djgpp binaries, but I guess they have had time to improve since
22:14:01Araqwell I said *valuable software* :P
22:14:10gradhaah, right
22:14:54VarriountOrionPK: Heads up, ircfamilier depends on pcre.dll
22:14:59Araqwe should port nimrod to DOS
22:15:11AraqVarriount: nimrod ships with pcre.dll
22:15:51VarriountAraq: Yes, but end users of a program don't typically have nimrod installed.
22:16:12Araqso copy pcre.dll into the same folder as your .exe
22:16:31Araqthat's how "DLL hell" is avoided ...
22:16:41VarriountWell yes, I know that. I just didn't know if OrionPK knew.
22:16:42NimBotAraq/Nimrod devel d3c9003 Zahary Karadjov [+2 ±11 -0]: introduce tyFromExpr; fixes #618
22:16:42NimBotAraq/Nimrod devel d08a21a Zahary Karadjov [+0 ±9 -0]: progress towards fixing tgenericshardcases
22:16:42NimBotAraq/Nimrod devel b4bdd39 Zahary Karadjov [+0 ±1 -0]: fix bootstrapping on windows
22:16:51VarriountYay!
22:16:59Araqarg ...
22:17:12gradhauh oh
22:17:17Araqzahary: what's tyFromExpr and do we really need it?
22:18:01Varriountgradha: You pull up the seats, I'll get the popcorn
22:18:07zaharythis is something that is completely unknown until we instantiate a generic; things like calls to compileTime procs accepting the generic params or exprssions like T.hight
22:18:33*zauberparacelsus left #nimrod (#nimrod)
22:18:34zaharysee tgenericshardcases for such tortures to the compiler
22:18:44Araqso that's for typing generics?
22:19:03Araqhmm ok
22:19:07zaharyit should be clear if you look at the test case
22:19:16AraqI remember it :P
22:19:22Araqno need to look at it again
22:19:45Araqso tyExpr doesn't work for that?
22:20:43zaharywell, I'm trying to reduce the overlapping of meanings now (reusing the same tyType for multiple purposes) - tyExpr is a macro parameter that doesn't require semantic checking
22:21:16Araqthat's good
22:21:34Araqbut promise me it's your last addition :P
22:21:45Araqwe really have lots of ty's now
22:21:54VarriountI wonder if, among all this metaprogramming, it might not be prudent to simply turn the generic instanciation syntax ('genericProc[type]') into simply a partial function applicator
22:22:16Araqand you always need to keep them in mind in skipTypes et al
22:22:19*BitPuffin joined #nimrod
22:22:48AraqVarriount: you still haven't convinced us that's a good idea
22:22:49*familiar125 joined #nimrod
22:22:57Araqhi familiar125 welcome
22:23:09BitPuffinI don't think that's a new nick
22:23:14BitPuffinAraq you are losing it
22:23:24Araqfamiliar125 is new
22:23:28BitPuffinWHERE'S THE BLOG POST, I'M LIKE REFRESHING AND SHITZ
22:23:44Araqhey
22:24:02zaharyone last addition that I plan is the introduction of what I call "mimic types", but it won't require new ty*s maybe; a mimic type is type that promises to behave exactly as another type; I promise that my_string behaves like string; then if I try to use my_string with a string accepting proc, the compiler treats the proc just if it was a generic - you'll get its body compiled for my_string
22:24:04BitPuffinsry
22:24:24*familiar125 quit (Remote host closed the connection)
22:24:31BitPuffinaw snap diddely
22:24:32Araqzahary: I had this idea too once
22:24:36BitPuffinwhat's the point of it zahary
22:24:56AraqI came to the conclusion it can't work iirc
22:25:22zaharywell, nominal typing must die, but that's a long story (BitPuffin);
22:25:26AraqBitPuffin: it turns concretes into generics
22:25:38zaharyhmm, what problems do you see with it. I should work
22:26:07AraqI called that "proxy" type back in the days iirc
22:26:12zaharyyes, I know
22:26:16Araq"mimic type" is nicer
22:26:23BitPuffinhow about
22:26:26BitPuffinproxic
22:26:35BitPuffinor mixy
22:26:49VarriountBitPuffin: Proxic sounds like toxic. Mixy sounds ok though
22:27:13Araqwell one problem is that you don't really want to support everything that "string" does
22:27:36zaharyand mimic types are a bit more precise - you can tell specifically what you "mimic" and you can even say things like seq[char] is JavascriptByteBuffer
22:27:51Araqbecause then you end up re-implementing string as it is today
22:27:53zaharyprecisely, you only need to support what is required by the procs that you end up using
22:28:04zaharyjust like normal generics
22:28:20Araqyeah but the procs promised to work on "string" not on "string-like" so it's fragile
22:28:55Araqone version of toUpper works, the next version uses 'newStringOfCap' (optimized) and breaks your code
22:28:59*VarriountFamilie joined #nimrod
22:29:12VarriountFamilieHm. Interesting
22:29:26Araqbut as an experimental feature it's fine
22:29:44zaharysure, but my goal is to just battle nominal typing when third party libraries don't cooperate in producing generic code
22:30:03Araqjust mark it as experimental
22:30:08Araqand "using" too btw
22:30:31Araqit's nice to be able to try out new things
22:30:44zaharyactually, I could even reuse using as a declaration method and say that everything about using is experiental
22:30:49zaharyusing my_string as string
22:32:03*VarriountFamilie quit (Read error: Connection reset by peer)
22:33:36VarriountAraq: Do you want me to write up a list of reasons?
22:33:52VarriountA-la Python's PEP's?
22:34:18Araqyes at least
22:35:07Araqbut even then it has 2 problems:
22:35:11Araq1. NIH
22:35:38Demos__DEBUG SYMBOLS! I have won the lottery :D
22:35:54Araq2. the core devs are busy implementing/fxing what they care about
22:36:44*xenagi quit (Quit: Leaving)
22:39:06VarriountAraq: Ah well.
22:52:58Araqzahary: please don't do "using my_string as string", that's inconsistent and so we need to change it even if the feature will be kept
22:53:22Araqtype my_string = mimic[string] is fine
22:56:50OrionPKthanks varriount
22:57:17zaharyhmm, I thought about something like this, but one problem is that it will let the user do the following error:
22:57:17zaharytype
22:57:18zahary my_string = object …
22:57:18zahary my_string = mimic string
22:57:19OrionPKfamiliar125 is probably a regular nimrod user araq
22:57:40OrionPKthat's the default name for irc familiar
22:58:09AraqOrionPK: I great when I think it's somebody new, I don't keep a list or something
22:58:11zaharyi.e. you have to have a second type section or some strange logic code in the type section processing code
22:58:14Araq*greet
22:58:27OrionPK:-)
22:58:42OrionPKit was probably varriount
22:58:47Araqtype my_string = object {.mimic: string.} ... but ok
22:58:56zaharyit's possible to do assume my_string is string (assume being a magic with AST constraints)
22:59:03AraqI see the problem
22:59:31*zielmicha8 quit (Remote host closed the connection)
23:00:10Araq"using my_string as string" is not good enough though
23:00:40zaharywhat about assume X is Y?
23:00:54Araqdoesn't stand out enough
23:01:01zaharythese have problems on their own - sometimes you want the declaration to be public and sometimes not
23:01:21Araqanything that doesn't use 'mimic' is not clear enough
23:01:50Araq{.mimic: X = y.} for a start, I guess
23:02:31Araqor perhaps
23:02:48Araqtype my_string {.mimic: string.} = object
23:02:51zaharyI have a bit more features than simple one-to-one mapping as I mentioned.
23:02:52zaharyyou can do assume seq[char] is JavascriptByteBuffer
23:02:52zaharyor assume MyAutoMocker is any
23:03:07zaharythe second one is the equivalent of your original tyProxy idea
23:04:05Araqso use {.mimic: x = y.} but it will be strange for the docgen
23:04:51zaharyI could do mimic my_string = string (if I go the AST constrained magic way)
23:05:10zaharyyou prefer pragma to make it more "scary"?
23:05:15Araqyes
23:05:22zaharyit's fine by me
23:05:47Araqthough the average nimrod code contains so many pragmas now that's really absurd to claim they are scary
23:06:17Araqso I played with {} instead of {. .}
23:06:37Araqwhich can be easily supported in the contexts they matter most
23:07:07Araqbut now I like them too much ...
23:07:17zahary:)
23:08:23AraqI still think we perhaps should use [. .] for generics when it's ambiguous otherwise
23:08:39Araqvar a: foo[bar] # stays
23:08:58Araqf[.x, y.](a, b) # generic, can't be array access
23:09:35zahary[] is indeed quite ambiguous, but this is likely to break lots of code
23:09:41OrionPKlol
23:10:14Araqwell it's easy to make the compiler warn about old [] usages
23:10:22OrionPKso is {} pragmas going to happen?
23:10:28EXetoCugh
23:10:38Araqand then people can migrate their code easily
23:10:57AraqOrionPK: make a forum post and ask around
23:11:07OrionPKI don't like the generics one
23:11:16OrionPKpsh
23:11:27AraqI think the {. .} should stay but I can be convinced to support {} too
23:11:53AraqOrionPK: the generics one I'm talking about are rarely used
23:12:21OrionPKthe nim forum support polls?
23:12:39Araqno ... but if you're lucky some people answer
23:12:54gradhalike the camelcase poll
23:13:24OrionPKheh
23:13:42OrionPKpeople don't get fired up about small things
23:13:43Araqzahary: in fact "nimrod pretty" works quite well, we can make it transform foo[a, b] into foo[.a, b.] automatically
23:14:08zaharyyeah, I figured
23:14:09OrionPKbut they might lean way or the other just not enough to say anything
23:15:03zaharyI'm too sleepy now to contemplate the consequence of making this change within the compiler, but most people will probably not like it. is our goal to just make our life easier as compiler writers?
23:15:39Araqwell a[b] has some problems when it comes to `[]` and auto-bind in templates
23:15:54Araqand [. .] mitigates this issue
23:16:33Araqbut alright, lets keep it the way it is
23:16:44Araqwe're optimizing for popularity these days
23:16:45zaharyOTOH, I've advocated the user of typedesc params instead of explicitly supplied generic params, so my opinion is that [. .] should not be present anywhere in the code
23:16:53zaharyadvocated the use
23:16:55AraqI know
23:18:59zaharyI'll be off to bed, good night
23:19:10gradhagood night, honey badgers
23:19:18*gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again)
23:19:27Araqalright good night
23:21:28Demos__is devel fixed on windows?
23:21:45AraqI think so
23:22:41EXetoCzahary: and it has no impact on either inference or default types?
23:23:37EXetoCthe use of typedesc instead of []
23:23:45EXetoCBitPuffin: you don't like that, right?
23:24:11AraqEXetoC: sure it has some impact [] are optional for a start
23:24:33Araqhe wants to use typedesc when it's mandatory
23:25:30*darkf joined #nimrod
23:34:50Demos__OK it built
23:34:59Demos__strangely it would not build using icc
23:40:53*familiar125 joined #nimrod
23:42:26EXetoCmandatory how? it sounded to me like he wanted only the typedesc approach to be used. if so, then I think this should be allowed: "proc f(x: var T, y: T, T: typedesc = int)". currently it's not because of the order
23:42:30*familiar125 quit (Remote host closed the connection)
23:42:53Araqno that's not what he meant afaict
23:42:54*dom_familiar joined #nimrod
23:43:08Araqhi dom_familiar
23:43:25dom_familiarwelcome Araq
23:43:36dom_familiarWell... this doesn't work at all OrionPK
23:43:51Araqha I knew it was you
23:43:57Araqdo you know why?
23:44:06Araqcause your nick starts with 'dom' ...
23:45:36*dom_familiar quit (Remote host closed the connection)
23:45:47EXetoCalright nevermind
23:46:07dom96Araq: Well done.
23:51:51Demos__goddamn, I dont like c# as a language but the general "design for tooling" objective produced some amazing results
23:52:24Demos__I renamed a file and VS was like "ima just change all the references to what looks like the class that file is named after"
23:58:08AraqBitPuffin: still not sleeping?
23:59:43OrionPKwhats up dom_familiar
23:59:49OrionPKwhat doesnt work