00:17:53 | * | io2 quit () |
00:21:11 | * | Demos_ joined #nimrod |
00:27:06 | * | BitPuffin joined #nimrod |
00:27:18 | BitPuffin | dom96!!!! |
00:27:21 | BitPuffin | dom96??? |
00:27:28 | BitPuffin | dom96!?!?!?!?! |
00:37:28 | Demos_ | wow divide by zero error in the compile, well done microsoft |
00:38:47 | Demos_ | actually this could be real invalid code |
01:08:47 | Demos_ | anyone know a way to generate a pdb file without defeating microsoft's compiler? |
01:12:01 | Demos_ | 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:56 | Demos_ | 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:42 | wan | An empty subscript [] notation can be used to derefer a reference |
05:10:09 | Demos_ | yes, I know |
05:10:20 | Demos_ | but it can not go from a ptr to a ref |
05:10:29 | wan | oh, ref |
05:10:48 | wan | overload? |
05:11:08 | Demos_ | I can't change the functions in question |
05:11:30 | Demos_ | I can reimplement them, but that is less than ideal |
05:22:37 | wan | var my_little_ref = cast[ref TThing](my_little_pointer) |
05:22:58 | wan | It should do the trick |
05:23:41 | * | Mordecai joined #nimrod |
05:23:49 | Demos_ | yeah, except then the gc would try and free it when the function returned |
05:24:13 | wan | Would it? It belongs to the upper scope. |
05:24:21 | Demos_ | the ptr does |
05:24:31 | Demos_ | no it would free it when the caller returned |
05:25:27 | Demos_ | 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:00 | Demos_ | I am passing these pointer to c# and letting the .net gc call a free function in the finalizers |
05:26:14 | wan | Yeah, 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:17 | Demos_ | 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:44 | Demos_ | one of the resaons why proc(a: int) = a + 1 is invalid code |
05:39:21 | fowl | wan, ref in nimrod is a garbage-collected pointer, pass-by-ref is called "var" |
05:41:47 | wan | Is there a difference for the function to call? |
05:43:27 | * | [1]Endy joined #nimrod |
05:44:00 | * | Demos__ joined #nimrod |
05:44:28 | wan | Does 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:14 | Demos__ | it may, and if it does the bug could be quite hard to detect |
05:54:44 | Demos__ | and fowl isn't nimrod's "pass by val" actually pass by const val or by const ref |
06:03:18 | fowl | maybe |
06:04:23 | Demos__ | 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:36 | zahary | Varriount: 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:59 | zahary | Araq, you requested the not types when I first implemented tfAll and tfAny - I have the IRC logs to prove it :P |
09:59:09 | zahary | anyway, 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:22 | exhu | hi |
10:19:10 | exhu | who is in charge of https://github.com/nimrod-code/cairo/issues/1 ? Please commit this line. |
10:20:00 | * | gradha joined #nimrod |
10:20:14 | exhu | and maybe someone can help with http://forum.nimrod-lang.org/t/333 |
10:33:51 | * | fntzr joined #nimrod |
10:34:27 | exhu | hi Araq |
10:35:08 | gradha | exhu: replied http://forum.nimrod-lang.org/t/333/1#1734 |
10:36:00 | Araq | hi exhu, gradha's answer is correct |
10:36:10 | exhu | Thanks guys! |
10:36:12 | Araq | hi fntzr welcome |
10:37:08 | Araq | exhu: I think the cario wrapper gets rid of the cairo_ prefix |
10:37:19 | Araq | and maybe also of the surface_ |
10:37:43 | Araq | so, make a consistent pull request please |
10:37:55 | exhu | Araq, too bad, it makes harder to refer to the original cairo docs/tutorials |
10:38:15 | Araq | not really |
10:38:47 | Araq | you simply say somewhere "nimrod has modules and as such namespaces and so we got rid of primitive prefixes" |
10:39:05 | Araq | and the cario docs even suggest this for wrappers iirc |
10:39:50 | exhu | Araq, do only module names get prefixed in binary form? i.e. importing private/mymodule and lib/mymodule can cause name collisions? |
10:40:25 | Araq | yeah |
10:40:28 | Araq | well |
10:40:35 | Araq | the rules are rather adhoc |
10:40:46 | Araq | the compiler tries to guess the "package" name |
10:41:01 | Araq | but there is no notion of package in the compiler/language |
10:41:48 | exhu | so it's very important to have module names unique |
10:42:01 | Araq | it uses the parent directory unless that's some crap like src, private, etc. :P |
10:42:44 | Araq | no it's not very important to have unique module names, it's important to have a sensible directory structure |
10:43:16 | exhu | Araq, how can i declare an alias for a type, i.e. like typedef in C works? |
10:43:29 | Araq | type Alias = SomeType |
10:43:52 | Araq | type sections give us that feature for free |
10:44:39 | gradha | exhu: your own forum example uses a type alias |
10:44:44 | exhu | ah, remembered the distinct keyword. |
10:44:54 | exhu | it was int32 and int that are distinct |
10:45:17 | exhu | that's why i got confused -) |
10:50:26 | exhu | i 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:13 | exhu | an asterisk makes package-private functions and types visible to package users |
10:51:44 | gradha | wrap your group of interconnected modules through a public single module |
10:52:13 | exhu | gradha, you mean via 'include' ? |
10:52:39 | gradha | if you have modules P1, P2, P3, create API and import P1, P2, P3 from API |
10:53:01 | gradha | people importing API will see only what you want, though I guess they can still import manually Px |
10:53:52 | gradha | but 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:14 | gradha | your documentation should be the API, not a .nim file |
10:54:16 | exhu | can i simply declare an alias for a proc? like API.sompublicproc = myrpivatemodule.MyProc ? |
10:55:16 | Araq | no use 'export' instead |
10:55:18 | gradha | never tried that, but you can export the sumbols you want |
10:56:16 | Araq | and btw nimrod's module system has already more features than most if not all other languages out there |
10:56:37 | Araq | so it's really annoying people still complain about it |
10:58:25 | Araq | the package stuff is about to distinguish jester/utils from nimgame/utils, not to distinguish private/utils from public/utils |
10:58:38 | Araq | use different module names in the same package for fuck's sake |
10:58:46 | Araq | how hard can it be? |
10:59:16 | Araq | </rant> |
10:59:27 | * | gradha ponders creating a foo babel package depending on bar |
10:59:28 | exhu | Araq, i don't mean using same package names in a single package, i mean collisions in different packages |
11:01:57 | exhu | Araq, 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:46 | Araq | that's not a problem |
11:09:21 | Araq | how many 'add' procs do you think we have? ;-) we have a good enough name mangling to deal with this problem |
11:10:01 | fntzr | Araq, hi ) |
11:24:15 | Araq | bbl |
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:42 | Varriount | gradha, I must thank you for informing me about the existance of the 'using' statement via the recent issue you posted. |
12:37:56 | Araq | hey, the using statement is new |
12:38:07 | Araq | and I'm not sure we should keep it :P |
12:38:46 | gradha | kill it with fire |
12:38:57 | Varriount | I think it'd be better in block form |
12:40:34 | gradha | block: using x |
12:40:45 | Varriount | Of course, I'm neutral as to whether it should stay or go. I haven't had much call to 'use' it yet. |
12:45:31 | gradha | Varriount: https://gist.github.com/gradha/8267759 |
12:47:00 | dom96 | OrionPK: Why not just use nginx's gzip capabilities? |
12:47:18 | dom96 | I think adding gzip to httpserver would be appropriate, but i'm not sure. |
12:47:27 | gradha | Varriount: I just updated the gist, if you modify it to use the statement keyword instead the compiler complains with a fun message |
12:47:39 | gradha | expression '(s|a)' has no type (or is ambiguous) |
12:47:58 | gradha | I was going to add that pitfall to the docs soon |
12:48:12 | gradha | maybe I should add my awesome macro too |
12:56:36 | dom96 | '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:31 | gradha | the argument against that was likely you could not disambiguate conflicting module imports |
13:01:12 | dom96 | I don't see how not using it in block form helps with that? |
13:01:43 | gradha | if you have a block form, for each "using" you have to indent your whole source one level |
13:02:17 | gradha | the manual example makes it quite clear: |
13:02:18 | gradha | import windows, sdl |
13:02:18 | gradha | using sdl.SetTimer |
13:06:30 | dom96 | oh, i see. |
13:07:03 | dom96 | Well, 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:59 | Araq | I don't get the example |
13:45:07 | Araq | "using sdl.SetTimer" wtf? |
13:45:25 | Araq | we already have from sdl import SetTimer |
13:45:54 | dom96 | hrm, true. |
13:45:59 | gradha | we 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:43 | Varriount|Mobile | How would one go about printing the value in a particular register in nimrod? |
14:01:19 | Araq | inline 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:00 | BitPuffin | dom96: ?!?!?! |
15:02:22 | dom96 | BitPuffin: yes? |
15:03:10 | BitPuffin | dom96: dota nao? |
15:03:46 | Araq | BitPuffin: let's make a deal |
15:04:02 | BitPuffin | Araq: deal? |
15:04:20 | Araq | I send you the plan, you implement the runtime parts of the concurrency model :P |
15:05:01 | BitPuffin | lol ;) |
15:05:08 | BitPuffin | like I have the skillz! |
15:06:13 | BitPuffin | And if it was fairly trivial then I'd imagine you would have already done it yourself hehe |
15:06:27 | BitPuffin | dom96: alright too late now I'm gonna play xD |
15:06:33 | dom96 | bah |
15:06:45 | dom96 | I should study anyway... |
15:06:58 | Araq | bbl |
15:07:27 | BitPuffin | dom96: or if you get going I'll practice with bots while you prepare |
15:07:41 | BitPuffin | dom96: no time to think |
15:07:44 | BitPuffin | yes or nein |
15:07:46 | BitPuffin | ja or nein |
15:07:58 | BitPuffin | ja eller nej |
15:08:01 | dom96 | nah |
15:08:04 | BitPuffin | nub |
15:08:06 | dom96 | Maybe 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:11 | Araq | hmm is it just me or have {.pragmas.} stopped being ugly? |
16:02:36 | Araq | I removed the dots to see how the code then looks |
16:02:53 | BitPuffin | Araq: I think there is some beauty to it |
16:02:53 | Araq | and for some reason {.pragmas.} are sexy now :P |
16:03:07 | BitPuffin | dom96: I won ;) |
16:03:10 | BitPuffin | I played Chen |
16:03:20 | BitPuffin | the ultimate micro manage hero |
16:03:23 | BitPuffin | really annoying |
16:03:26 | BitPuffin | but it went quite well |
16:04:00 | BitPuffin | dom96: another window for you to join in |
16:04:03 | BitPuffin | going in 10 |
16:04:09 | BitPuffin | 5 |
16:04:11 | BitPuffin | 3 |
16:04:13 | BitPuffin | 2 |
16:04:15 | BitPuffin | 1 |
16:04:17 | BitPuffin | 0 |
16:04:25 | BitPuffin | okay I'll play another one by myself then |
16:04:35 | Araq | can't you use PM for your gaming arragements? |
16:05:01 | Araq | it'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:22 | Varriount | Araq, good morning! |
16:47:59 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
16:49:54 | Varriount | Araq, 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:36 | OrionPK | you mean like a C# style using? |
17:10:47 | Araq | Varriount: no otherwise zahary would have implemented it as a macro |
17:11:22 | OrionPK | are you talking about using or with? |
17:11:40 | Araq | the question was about "using" |
17:12:19 | OrionPK | I thought zahary was implementing a with statement |
17:12:34 | Araq | yeah but he called it "using" |
17:13:14 | OrionPK | so then my question is did varriount mean C# style using or javascript style with :P |
17:13:32 | Araq | our "using" is "with"-like |
17:13:41 | OrionPK | yeah |
17:13:54 | Araq | and btw JS got it from Pascal |
17:14:06 | OrionPK | im sure C# got it from somewhere |
17:14:25 | Araq | and I've seen it produce horrible code in pascal hence I'm against it |
17:14:41 | OrionPK | its the same story with JS |
17:14:53 | Araq | but then "can be misused" is not really a criterion we care about ... |
17:15:21 | Araq | "can be misused" is almost like "can be confusing" |
17:18:25 | Araq | so ... 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:56 | OrionPK | out with the old, in with the new |
17:20:09 | Araq | I still hope it works in practice |
17:22:34 | Araq | looks *really* good though :-) |
17:23:48 | OrionPK | cant wait to see it |
17:24:15 | Araq | I should be done by tonight |
17:24:21 | Araq | I know I've said this before :P |
17:25:29 | dom96 | with the design or the implementation? ;P |
17:25:34 | Araq | the design |
17:25:56 | Araq | but I kept the design implementable |
17:28:23 | Demos__ | with seems like a bad idea... |
17:29:35 | Araq | Demos__: to answer your question, the compiler already makes use of the fact it's allowed to pass by "const&" |
17:30:00 | Demos__ | wow, kinda an old question but thanks |
17:30:07 | Varriount | Although 'using'/'with' seem like nice things, I'm afraid that they probably won't be needed very often (see: the 'do' statement) |
17:30:52 | Araq | zahary has lots of meta programming use cases that require 'using' under the hood |
17:31:18 | Araq | so we'll have some hard time to argue against it |
17:31:56 | Varriount | Araq, the problem with all this meta-programming is that half of it is broken or limited, or verbose |
17:32:19 | Araq | hey |
17:32:51 | Araq | saying that is like blasphemy here |
17:33:03 | Varriount | Araq, I meant the type-class metaprogramming stuff |
17:33:21 | Varriount | Not the 'with' statement, macros, etc |
17:33:21 | Araq | well he's working on it |
17:33:29 | Varriount | True. *sigh* |
17:33:57 | Varriount | I'm just grumpy because I can't build nimrod |
17:34:27 | Araq | yeah I can feel your pain |
17:34:34 | Varriount | In other news, Araq, it might actually be possible to implement that file id thing you mentioned. |
17:34:44 | Araq | cool |
17:35:18 | Demos__ | Varriount, I had the same problem as you building devel |
17:35:30 | Varriount | The only.. caveat is that how 'unique' an id is depends on the os and fs |
17:35:56 | Araq | er ... what? |
17:36:22 | Varriount | Operating System and File System |
17:36:39 | Araq | er ... what? |
17:36:59 | Varriount | Depending on the two, a file copy or move operation could change file's ID |
17:37:23 | Araq | that's not an issue |
17:38:22 | Araq | oh sorry |
17:38:44 | Araq | time machine stroke again |
17:38:51 | Varriount | Howso? |
17:38:57 | Araq | os.sameFile already exists |
17:39:48 | Varriount | True. But if we have a working stat() like call, we could just replace sameFile's machinery to use the the proc/type |
17:42:25 | Varriount | Demos__, yeah, I read your message last night - apparently some wierd code zahary introduced is getting data types muddled. |
17:44:12 | Araq | well you can always roll back |
17:47:07 | Araq | samefile is the wrong interface though |
17:47:22 | Araq | an id can be hashed etc |
17:49:46 | gradha | what's the equivalent of "\n" for a character other than using the hex code? |
17:50:23 | Araq | \L |
17:52:38 | gradha | nice, zero hits in the docs |
17:53:39 | Araq | and now you know what you have to do |
17:53:47 | gradha | same for \T |
17:53:52 | Araq | and now you know what you have to do |
17:54:06 | gradha | does \L mean different line ending on different platforms? |
17:54:12 | Araq | no |
17:54:23 | Araq | it's always LF aka binary 10 |
17:54:39 | Araq | \C is always CR aka binary 13 |
17:54:56 | Araq | \R is the same as \C iirc |
17:55:06 | Araq | but \F is not the same as \L |
17:56:34 | Varriount | You know, it amazes me how similar Windows API's are to parts of the Posix standard |
17:57:02 | gradha | careful there |
17:57:06 | Araq | it amazes me how often windows' API is better :P |
17:57:24 | Araq | but I'm biased |
17:57:36 | Varriount | It'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:51 | OrionPK | lol |
17:58:27 | Araq | nah ... I take it back |
17:58:34 | Araq | windows' API is awful |
17:59:11 | Araq | but at least they cared about binary compatibility and defined the numeric values of constants |
17:59:39 | EXetoC | Varriount: That would almost be surprising |
17:59:46 | Araq | instead of saying "yeah there is this opaque constant EFOO here, so you can only use it from C" |
18:00:36 | Araq | "Or you can write a C program to determine its value" |
18:01:22 | Araq | "good luck with that approach for the things we defined as C macros though :P " |
18:02:50 | Varriount | For 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:45 | Araq | Varriount: 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:24 | Varriount | Araq, you mean, like horrible naming conventions? |
18:04:59 | Araq | it's called prgmmng wtht vwls |
18:05:07 | Araq | ("programming without vowels") |
18:05:16 | OrionPK | there's a \L ? |
18:05:18 | OrionPK | shit |
18:05:20 | OrionPK | that would be nice to know |
18:06:21 | Varriount | Araq: Well of course, everyone knows that vowels are an endagered species. |
18:07:34 | Varriount | Araq: 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:53 | Araq | uh oh not again |
18:08:07 | Varriount | Huh? |
18:08:09 | Araq | fork() lead to memory overcommitting for instance |
18:08:55 | Araq | redirection of stdin/stderr/stdout requires some heavy drinking to get right |
18:09:22 | Araq | even though it's claimed to be the essence of that OS |
18:09:40 | Araq | the sockets APIs are archaic crap |
18:09:57 | BitPuffin | Araq: ping me when you publish. I am eager to read |
18:10:00 | EXetoC | so that's just an issue with certain shells? |
18:10:07 | EXetoC | *not just |
18:10:10 | gradha | Varriount: you already asked the question in previous irc sessions, seems you didn't have enough |
18:10:10 | BitPuffin | it's gonna be intersting I am sure |
18:10:51 | Araq | the signal mechanism is ill specified and can be used for subtle attacks |
18:11:50 | Varriount | gradha: 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:17 | Varriount | Araq: How do you feel about the Plan 9 os? |
18:12:27 | gradha | Varriount: that only works if you go now to #unix and ask why the windows API sucks |
18:12:55 | Varriount | gradha: I already know why the Windows API sucks. |
18:13:05 | Araq | the security model is primitive at best and simply doesn't work for desktops but then so does windows's model |
18:14:58 | gradha | Varriount: opinions are like pokemon, kind of different, and you never seem to collect all |
18:15:39 | Varriount | gradha: But each one is special, in it's own unique way. |
18:15:43 | EXetoC | Araq: 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:51 | Varriount | Besides, I like pokemon. |
18:16:08 | gradha | meh, digimon beats pokemon any day |
18:16:13 | Araq | EXetoC: just check out osproc.nim (which we still got wrong ...) |
18:16:27 | Araq | has nothing to do with shells |
18:16:37 | Araq | but these would be my next complains |
18:16:55 | Araq | strange quoting rules, strange interaction of features |
18:17:06 | Araq | or how about ANSI escape codes? |
18:17:18 | Araq | ever tried to redirect something that produces colored output? |
18:17:58 | Araq | and the escape codes are in a way very typical |
18:18:09 | gradha | talking about colors, there's still no way to deal with color text and c++ people want a standard 2d drawing library |
18:18:24 | Araq | because Unix has a fundamental problem with *APIs* |
18:18:41 | Araq | so they come up with lots of other "protocols" instead |
18:18:41 | Varriount | ^*Posix |
18:19:32 | gradha | see http://lists.cairographics.org/archives/cairo/2013-December/024858.html and facepalm yourself |
18:19:56 | gradha | there's still no standard way to put a pixel on the screen |
18:20:19 | Araq | gradha: yes because that would require an API |
18:20:33 | Araq | instead of dumping crap onto stdout |
18:20:37 | Varriount | Ugh. C++ api |
18:20:43 | joelmo | im reading in the tutorial about templates, how do i use pattern operators https://gist.github.com/joelmo/69aade091324cecbaee6 |
18:20:46 | Araq | or is it stderr? who knows |
18:20:49 | gradha | well, there's no standard way to put text on the screen either |
18:21:05 | gradha | C really sucks for input/output other than "streams" |
18:21:08 | EXetoC | Araq: got it |
18:22:01 | Araq | Varriount: and finally package managers really are about patching over the braindead /usr/bin file hierarchy |
18:22:06 | Varriount | joelmo: What is the expected output? |
18:22:14 | joelmo | Varriount: 2 |
18:22:20 | Araq | yes they are also about the dependencies |
18:22:24 | Varriount | joelmo: And what do you get? |
18:22:45 | joelmo | 1 |
18:23:16 | joelmo | its in the gist :P |
18:23:44 | Araq | joelmo: bug report please |
18:24:08 | Araq | though it's a strange example and not guaranteed to work |
18:24:19 | Araq | I'm curious why it doesn't work anymore |
18:24:51 | joelmo | I can post a bug report and link to the gist and the manual |
18:25:21 | Araq | I know it's from the manual |
18:25:42 | EXetoC | Araq: how would one deal with the upgrading of all packages then? and only those that aren't up-to-date already |
18:26:11 | Varriount | gradha: Why would a sane proprietor of standards, seeking something like a standard 2d library, want it to be in C++? |
18:26:32 | Araq | EXetoC: a package manager is useful but it's still also a patch over the broken directory hierarchy |
18:26:48 | gradha | Varriount: maybe they enjoy pain, or inflicting it unto others |
18:26:52 | EXetoC | right |
18:27:27 | Varriount | Isn't c++, like, anathema to standardization efforts? (or at least, interfacing efforts) |
18:27:45 | Demos__ | well if c++ had proper modules it would be a pretty nice language (unless you like writing tools) |
18:28:49 | Varriount | Demos__: 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:57 | Demos__ | 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:18 | Demos__ | well there is a standard API, called the c++ standard library |
18:29:29 | Demos__ | I don't think a standard ABI is a good idea |
18:29:40 | Araq | Demos__: I disagree with you |
18:29:43 | EXetoC | gradha: should there really be a standard way for stuff like that? it's C we're talking about |
18:29:53 | Araq | there is plenty of stuff in C that doesn't interface well with other languages |
18:30:02 | Araq | you have to pick of subset of C for that to work |
18:30:09 | Araq | same for C++ really |
18:30:24 | Demos__ | yeah, that was my point. No matter what you do the subset ends up being more or less the same |
18:30:32 | Araq | ok the subset is larger for C then for C++ but only because C is smaller language |
18:30:50 | Araq | *than |
18:31:39 | Araq | and partly the linking technology straight from the 60ies is to blame for that |
18:31:51 | Demos__ | 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:53 | gradha | EXetoC: standards are good if the market itself can't reach a defacto standard, I don't think a 2d api needs that |
18:32:15 | Demos__ | gradha, I am not so sure |
18:33:14 | gradha | consider 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:35 | gradha | of course, everybody at some point catched up with opengl, and… opengl lagged behind, which is when standards suck |
18:33:50 | Demos__ | 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:50 | gradha | two sides from the same coin |
18:34:03 | EXetoC | is it not back on track now? |
18:34:20 | gradha | it's far behind DirectX according to people in the know |
18:35:00 | Demos__ | I was under the impression that GL and DX are pretty much the same feature wise. DX is much less painful though |
18:35:00 | gradha | OpenGLES may play the same role, unifying the API of mobile devices, then preventing them from improving |
18:35:45 | Demos__ | I think that graphics APIs that know something about the language they are being used from are a good thing |
18:35:55 | gradha | Demos__: 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:00 | Demos__ | not true |
18:36:12 | Demos__ | GL4.4 has most everything core |
18:36:45 | Demos__ | maybe some cutting edge Direct3D 11.2 stuff is missing but that is /really/ cutting edge |
18:37:15 | Demos__ | now actually getting driver support for GL4.4 is another story |
18:37:39 | Demos__ | if you use GL4.4 you are pretty much going to only run on windows |
18:38:17 | EXetoC | gradha: they didn't agree? are you referring to the fact that there are numerous extensions? |
18:38:43 | EXetoC | because GL was indeed first IIRC, and then that highly platform-specific API came along |
18:40:00 | Demos__ | 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:02 | gradha | EXetoC: that's what I said, when everybody catched up with GL, it stopped being useful and lagged in progress of features |
18:44:30 | Demos__ | 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:33 | Araq | Demos__: may be surprising for you, but I agree |
18:45:39 | Demos__ | oh, does anyone have an answer to my question about refs and ptrs? |
18:46:04 | Araq | you can try and cast ptr to 'ref' if the code never invokes the write barrier |
18:46:14 | EXetoC | gradha: yeah, and the only competitor now is OS-specific. I strongly dislike that approach |
18:47:13 | Araq | you can compile with -d:useSysAssert and -d:useGcAssert and then you get some nice checking for that |
18:47:54 | Demos__ | 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:15 | Araq | why not use GC_ref/unref on the 'ref' immediately? |
18:49:45 | Araq | it's the same situation as returning a string as cstring and copying it immediately |
18:51:02 | Demos__ | that is what I am doing now and my memory is getting corrupted, maybe the problem is elsewhere though |
18:51:24 | Araq | you can compile with -d:useSysAssert and -d:useGcAssert and then you get some nice checking then |
18:51:57 | Demos__ | 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:22 | EXetoC | gcAssert is for debugging the GC? |
18:52:26 | Araq | no, what does mess up the GC is likely the fact that C# runs your stuff on a different thread |
18:52:39 | Araq | and so the GC tracks the wrong stack |
18:52:47 | Araq | that's what I would guess anyway |
18:52:58 | Araq | try GC_disable/enable |
18:53:01 | Araq | EXetoC: yes |
18:53:10 | Demos__ | well I am never passing structures to/from c# |
18:53:36 | Araq | structures seem to be safer than pointers for your use cases though |
18:55:14 | Demos__ | 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:32 | Araq | Demos__: called 'setStackBottom' ? |
18:55:44 | Araq | cause you really should |
18:56:04 | Araq | in your C# main |
18:57:10 | * | OrionPK quit (Remote host closed the connection) |
18:58:04 | Demos__ | can not find docs for that function... |
18:58:16 | Araq | yeah ... :-/ |
18:59:14 | Demos__ | those assertion options moved me closer to the bug |
18:59:47 | Demos__ | it would be really nice if c#'s AccessViolationException actually reported the memory location you tried to access |
19:01:00 | Araq | Demos__: it's exported as initStackBottom(void) |
19:01:17 | Araq | so try to call that please |
19:01:38 | Araq | btw does use Visual Studio threads? I'm sure it does ... |
19:01:56 | Araq | you need to call that in the thread that runs the nimrod code |
19:03:02 | * | OrionPK joined #nimrod |
19:05:54 | Demos__ | 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:29 | Demos__ | and setStackBottom is apparently exported as nimrtl_setStackBottom according to dependency walker |
19:08:28 | Araq | quite possible |
19:08:40 | Araq | but you need initStackBottom |
19:09:30 | Araq | well 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:34 | Araq | sad but true |
19:10:34 | Demos__ | wont that leak memory? |
19:11:07 | Araq | yeah but it might be fine, not sure what you're doing |
19:13:31 | Demos__ | yeah, that "fixed" my problem |
19:14:17 | Araq | well the aggressive GC that's picky about its main stack has its downsides :P |
19:14:43 | Araq | you can also try to link against --gc:boehm |
19:15:15 | Demos__ | 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:34 | Araq | that's a good idea |
19:16:33 | Araq | and that really should work :P |
19:18:04 | * | OrionPK quit (Remote host closed the connection) |
19:18:56 | Demos__ | 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:26 | Araq | well if you disable the Gc, ref is fine for those |
19:21:23 | Demos__ | should I reimplement the initialization functions (the ones that go new(result))? |
19:24:00 | Araq | if you get rid of 'ref' that's what you need to do |
19:25:26 | * | OrionPK joined #nimrod |
19:27:28 | Demos__ | 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:06 | Araq | the Gc doesn't track what's in the memory allocated by alloc, so you need to GC_ref/unref these |
19:29:45 | Araq | the string or the ref always go to the thread local GC'ed heap |
19:29:51 | Araq | always |
19:30:12 | * | zielmicha-cloud_ quit (Ping timeout: 246 seconds) |
19:30:19 | * | zielmicha-cloud_ joined #nimrod |
19:30:28 | Demos__ | but if the GC is off than I have no way of ever deallocating the ref or string |
19:31:00 | Araq | well you can always enable the GC and make it perform a cleanup |
19:31:50 | Demos__ | right, but then I have the same problem with threads |
19:32:26 | Araq | which problem exactly? disabling the GC solves it |
19:33:38 | Demos__ | 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:25 | Araq | well that's a hard problem to solve but not impossible unless VS doesn't even run it always on the same thread |
19:37:40 | Araq | though thinking about it ... |
19:37:55 | Araq | what's wrong with calling initStackBottom? |
19:40:08 | * | OrionPK quit (Ping timeout: 246 seconds) |
19:46:44 | Demos__ | where is initStackBottom it is not in the index and I cant find it in dependency walker |
19:47:20 | Araq | grep for it, exportc it |
19:47:30 | Araq | document it |
19:48:27 | Demos__ | k |
19:52:19 | * | Mat3 joined #nimrod |
19:52:22 | Mat3 | hi all |
19:52:38 | gradha | yay |
19:53:31 | * | Icefoz quit (*.net *.split) |
19:53:32 | * | wan quit (*.net *.split) |
19:53:38 | Mat3 | hi gradha |
19:58:22 | Araq | hi Mat3 |
19:59:10 | Mat3 | hi Araq |
19:59:29 | Mat3 | how about your documentation effort ? |
19:59:47 | Araq | I'm in the 3rd iteration now |
20:00:01 | Araq | and things are now really looking good |
20:00:13 | Araq | plan to finish it tonight |
20:00:35 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
20:02:56 | * | OrionPK joined #nimrod |
20:03:34 | Mat3 | nice |
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:57 | Mat3_ | is someone here interested in a soft-core for FPGA (my VM design) ? |
20:21:59 | OrionPK | i 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:13 | Demos__ | 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:27 | Araq | Mat3_: please elaborate |
20:37:29 | Mat3_ | 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:24 | Demos__ | I am ddebugging a problem where visual studio crashes if you type a keyword followed by a lowercase l |
20:47:43 | Demos__ | although it crashes in a whole lot of other circumstances as well, so who knows |
20:47:44 | Araq | visual studio is cool |
20:53:40 | * | OrionPK joined #nimrod |
20:54:21 | Mat3_ | 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:09 | Demos__ | well I am using notepad c++ but I am debugging code running in VS |
20:58:21 | Demos__ | VS is not buggy my code is buggy |
21:02:00 | * | zauberparacelsus joined #nimrod |
21:04:06 | zauberparacelsus | As 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:33 | dom96 | wildcard urls? |
21:06:28 | zauberparacelsus | yeah, 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:41 | dom96 | You can do that with jester |
21:06:51 | zauberparacelsus | really? The docs said that you can't |
21:07:15 | zauberparacelsus | though, since I now see you're the dev, I'll take your word for it, lol |
21:07:37 | dom96 | hrm, well I assumed "/page/@page" would fit your needs heh |
21:07:46 | zauberparacelsus | lol |
21:08:03 | dom96 | I just remember that that is one of things from sinatra that I did not implement |
21:08:06 | zauberparacelsus | now, suppose I want to just match all possible URLs to a single pattern? |
21:08:18 | OrionPK | cant you use a regex |
21:08:21 | OrionPK | getre |
21:08:26 | dom96 | yeah, you can use regex |
21:08:34 | Mat3_ | Demos_: Try fdbg |
21:09:24 | dom96 | zauberparacelsus: What is that you want to do exactly? |
21:10:00 | dom96 | *is it |
21:10:01 | zauberparacelsus | basically, my wiki engine, which is implemented in Python and Flask, would match all URLs down to a single route. |
21:11:36 | OrionPK | why 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:06 | dom96 | yeah, presumably all you need is: get "/@pagename": ... |
21:12:12 | zauberparacelsus | dom96: thank you |
21:12:37 | Mat3_ | ciao |
21:12:54 | * | Mat3_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
21:16:10 | Demos__ | 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:11 | OrionPK | windows search doesn't look inside files, does it? |
21:17:36 | Demos__ | it sometimes does |
21:17:55 | Demos__ | oh, I think it just ignores nim files |
21:18:45 | OrionPK | you can set up full text indexes |
21:19:13 | OrionPK | I don't think that it's going to search in files ootb tho |
21:20:36 | Demos__ | yeah, I just added nim to the list of files it will fully index |
21:29:55 | Araq | why do you use windows search when you can use nimgrep? :P |
21:30:09 | Araq | nimgrep is the best tool I've ever used *cough* |
21:31:57 | * | EXetoC joined #nimrod |
21:36:07 | * | brson joined #nimrod |
21:37:12 | Demos__ | 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:03 | OrionPK | you're in dangerous territory :P |
21:40:24 | zauberparacelsus | are there any YAML parsers for Nimrod? |
21:40:27 | Araq | finalizers in C# and Java are quite slow though |
21:40:34 | OrionPK | no zauberparacelsus |
21:40:45 | Araq | zauberparacelsus: not that I know of, there are JSON parsers though |
21:40:50 | zauberparacelsus | ok, thanks |
21:40:57 | Araq | and wrapping a C lib is not hard |
21:41:05 | zauberparacelsus | yeah |
21:41:10 | Araq | if you do that, please put it on babel |
21:41:18 | zauberparacelsus | aye |
21:41:24 | Araq | so the next time we can answer with "yes" :-) |
21:41:31 | zauberparacelsus | yep |
21:43:24 | Demos__ | 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:51 | Araq | sure, I would use them too |
21:44:33 | Araq | just sayin' that the nice generational copying collection GC has its downsides |
21:44:50 | OrionPK | so anyone want to try out a windows build of irc familiar |
21:45:03 | Araq | because if you copy what's alive, you don't really know what's dead |
21:45:15 | Araq | and so finalizers start to get really expensive |
21:46:14 | zauberparacelsus | are there any guides for creating bindings to C libraries? |
21:46:28 | Demos__ | well yes, but c# does not care. c# is about getting somewhat decent performance without much effort |
21:46:45 | Demos__ | http://lucumr.pocoo.org/2013/8/18/beautiful-native-libraries/ |
21:48:43 | OrionPK | https://dl.dropboxusercontent.com/u/417554/ircfamiliar.zip |
21:53:48 | gradha | http://cbloomrants.blogspot.com.es/2013/12/12-31-13-statically-linked-dll.html |
21:56:17 | OrionPK | jesus christ gradha |
21:56:21 | OrionPK | are you trying to get us all killed |
21:57:28 | Araq | oh god |
21:57:31 | Araq | " 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:48 | Araq | does the guy even know how DLLs work on windows? o.O |
21:58:12 | Araq | it's dead simple to use multiple different DLL versions ... |
21:58:27 | Araq | from multiple products at least |
21:58:49 | Araq | heck, I can still run all my windows software everywhere including on wine |
21:58:57 | Araq | try that with a linux binary |
22:06:14 | Demos__ | well that is only because everyone distributes the windows dlls with the application |
22:06:27 | Araq | *shrug* it works |
22:07:00 | Araq | and it works since decades |
22:07:40 | Demos__ | but it is strictly worse than using static libs, since you get none of the benefits of dynamic libraries |
22:08:15 | Araq | perhaps but it *works* :P |
22:08:44 | Demos__ | true |
22:08:45 | Araq | windows is the only OS which really cares about to keep running your software |
22:10:14 | Araq | and most DOS based games are more portable than the average JVM software thanks to dosbox |
22:11:02 | Araq | the morale of the story is: if your software is valuable, it's portable soon enough |
22:11:13 | gradha | does dosbox support now 32bit mode? |
22:11:27 | Varriount | OrionPK: Just downloaded ircfamilier. Chrome says that it is "a potentially dangerous file" |
22:11:33 | Araq | I think so, gradha |
22:11:34 | Varriount | :O |
22:12:45 | Varriount | I really wish you could restrict a program's file access in a fine-tuned way.. |
22:13:04 | Araq | gradha: I used to run warcraft 1 on it which is a 32bit application |
22:13:41 | gradha | it 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:01 | Araq | well I said *valuable software* :P |
22:14:10 | gradha | ah, right |
22:14:54 | Varriount | OrionPK: Heads up, ircfamilier depends on pcre.dll |
22:14:59 | Araq | we should port nimrod to DOS |
22:15:11 | Araq | Varriount: nimrod ships with pcre.dll |
22:15:51 | Varriount | Araq: Yes, but end users of a program don't typically have nimrod installed. |
22:16:12 | Araq | so copy pcre.dll into the same folder as your .exe |
22:16:31 | Araq | that's how "DLL hell" is avoided ... |
22:16:41 | Varriount | Well yes, I know that. I just didn't know if OrionPK knew. |
22:16:42 | NimBot | Araq/Nimrod devel d3c9003 Zahary Karadjov [+2 ±11 -0]: introduce tyFromExpr; fixes #618 |
22:16:42 | NimBot | Araq/Nimrod devel d08a21a Zahary Karadjov [+0 ±9 -0]: progress towards fixing tgenericshardcases |
22:16:42 | NimBot | Araq/Nimrod devel b4bdd39 Zahary Karadjov [+0 ±1 -0]: fix bootstrapping on windows |
22:16:51 | Varriount | Yay! |
22:16:59 | Araq | arg ... |
22:17:12 | gradha | uh oh |
22:17:17 | Araq | zahary: what's tyFromExpr and do we really need it? |
22:18:01 | Varriount | gradha: You pull up the seats, I'll get the popcorn |
22:18:07 | zahary | this 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:34 | zahary | see tgenericshardcases for such tortures to the compiler |
22:18:44 | Araq | so that's for typing generics? |
22:19:03 | Araq | hmm ok |
22:19:07 | zahary | it should be clear if you look at the test case |
22:19:16 | Araq | I remember it :P |
22:19:22 | Araq | no need to look at it again |
22:19:45 | Araq | so tyExpr doesn't work for that? |
22:20:43 | zahary | well, 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:16 | Araq | that's good |
22:21:34 | Araq | but promise me it's your last addition :P |
22:21:45 | Araq | we really have lots of ty's now |
22:21:54 | Varriount | I 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:16 | Araq | and you always need to keep them in mind in skipTypes et al |
22:22:19 | * | BitPuffin joined #nimrod |
22:22:48 | Araq | Varriount: you still haven't convinced us that's a good idea |
22:22:49 | * | familiar125 joined #nimrod |
22:22:57 | Araq | hi familiar125 welcome |
22:23:09 | BitPuffin | I don't think that's a new nick |
22:23:14 | BitPuffin | Araq you are losing it |
22:23:24 | Araq | familiar125 is new |
22:23:28 | BitPuffin | WHERE'S THE BLOG POST, I'M LIKE REFRESHING AND SHITZ |
22:23:44 | Araq | hey |
22:24:02 | zahary | one 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:04 | BitPuffin | sry |
22:24:24 | * | familiar125 quit (Remote host closed the connection) |
22:24:31 | BitPuffin | aw snap diddely |
22:24:32 | Araq | zahary: I had this idea too once |
22:24:36 | BitPuffin | what's the point of it zahary |
22:24:56 | Araq | I came to the conclusion it can't work iirc |
22:25:22 | zahary | well, nominal typing must die, but that's a long story (BitPuffin); |
22:25:26 | Araq | BitPuffin: it turns concretes into generics |
22:25:38 | zahary | hmm, what problems do you see with it. I should work |
22:26:07 | Araq | I called that "proxy" type back in the days iirc |
22:26:12 | zahary | yes, I know |
22:26:16 | Araq | "mimic type" is nicer |
22:26:23 | BitPuffin | how about |
22:26:26 | BitPuffin | proxic |
22:26:35 | BitPuffin | or mixy |
22:26:49 | Varriount | BitPuffin: Proxic sounds like toxic. Mixy sounds ok though |
22:27:13 | Araq | well one problem is that you don't really want to support everything that "string" does |
22:27:36 | zahary | and 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:51 | Araq | because then you end up re-implementing string as it is today |
22:27:53 | zahary | precisely, you only need to support what is required by the procs that you end up using |
22:28:04 | zahary | just like normal generics |
22:28:20 | Araq | yeah but the procs promised to work on "string" not on "string-like" so it's fragile |
22:28:55 | Araq | one version of toUpper works, the next version uses 'newStringOfCap' (optimized) and breaks your code |
22:28:59 | * | VarriountFamilie joined #nimrod |
22:29:12 | VarriountFamilie | Hm. Interesting |
22:29:26 | Araq | but as an experimental feature it's fine |
22:29:44 | zahary | sure, but my goal is to just battle nominal typing when third party libraries don't cooperate in producing generic code |
22:30:03 | Araq | just mark it as experimental |
22:30:08 | Araq | and "using" too btw |
22:30:31 | Araq | it's nice to be able to try out new things |
22:30:44 | zahary | actually, I could even reuse using as a declaration method and say that everything about using is experiental |
22:30:49 | zahary | using my_string as string |
22:32:03 | * | VarriountFamilie quit (Read error: Connection reset by peer) |
22:33:36 | Varriount | Araq: Do you want me to write up a list of reasons? |
22:33:52 | Varriount | A-la Python's PEP's? |
22:34:18 | Araq | yes at least |
22:35:07 | Araq | but even then it has 2 problems: |
22:35:11 | Araq | 1. NIH |
22:35:38 | Demos__ | DEBUG SYMBOLS! I have won the lottery :D |
22:35:54 | Araq | 2. the core devs are busy implementing/fxing what they care about |
22:36:44 | * | xenagi quit (Quit: Leaving) |
22:39:06 | Varriount | Araq: Ah well. |
22:52:58 | Araq | zahary: 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:22 | Araq | type my_string = mimic[string] is fine |
22:56:50 | OrionPK | thanks varriount |
22:57:17 | zahary | hmm, I thought about something like this, but one problem is that it will let the user do the following error: |
22:57:17 | zahary | type |
22:57:18 | zahary | my_string = object … |
22:57:18 | zahary | my_string = mimic string |
22:57:19 | OrionPK | familiar125 is probably a regular nimrod user araq |
22:57:40 | OrionPK | that's the default name for irc familiar |
22:58:09 | Araq | OrionPK: I great when I think it's somebody new, I don't keep a list or something |
22:58:11 | zahary | i.e. you have to have a second type section or some strange logic code in the type section processing code |
22:58:14 | Araq | *greet |
22:58:27 | OrionPK | :-) |
22:58:42 | OrionPK | it was probably varriount |
22:58:47 | Araq | type my_string = object {.mimic: string.} ... but ok |
22:58:56 | zahary | it's possible to do assume my_string is string (assume being a magic with AST constraints) |
22:59:03 | Araq | I see the problem |
22:59:31 | * | zielmicha8 quit (Remote host closed the connection) |
23:00:10 | Araq | "using my_string as string" is not good enough though |
23:00:40 | zahary | what about assume X is Y? |
23:00:54 | Araq | doesn't stand out enough |
23:01:01 | zahary | these have problems on their own - sometimes you want the declaration to be public and sometimes not |
23:01:21 | Araq | anything that doesn't use 'mimic' is not clear enough |
23:01:50 | Araq | {.mimic: X = y.} for a start, I guess |
23:02:31 | Araq | or perhaps |
23:02:48 | Araq | type my_string {.mimic: string.} = object |
23:02:51 | zahary | I have a bit more features than simple one-to-one mapping as I mentioned. |
23:02:52 | zahary | you can do assume seq[char] is JavascriptByteBuffer |
23:02:52 | zahary | or assume MyAutoMocker is any |
23:03:07 | zahary | the second one is the equivalent of your original tyProxy idea |
23:04:05 | Araq | so use {.mimic: x = y.} but it will be strange for the docgen |
23:04:51 | zahary | I could do mimic my_string = string (if I go the AST constrained magic way) |
23:05:10 | zahary | you prefer pragma to make it more "scary"? |
23:05:15 | Araq | yes |
23:05:22 | zahary | it's fine by me |
23:05:47 | Araq | though the average nimrod code contains so many pragmas now that's really absurd to claim they are scary |
23:06:17 | Araq | so I played with {} instead of {. .} |
23:06:37 | Araq | which can be easily supported in the contexts they matter most |
23:07:07 | Araq | but now I like them too much ... |
23:07:17 | zahary | :) |
23:08:23 | Araq | I still think we perhaps should use [. .] for generics when it's ambiguous otherwise |
23:08:39 | Araq | var a: foo[bar] # stays |
23:08:58 | Araq | f[.x, y.](a, b) # generic, can't be array access |
23:09:35 | zahary | [] is indeed quite ambiguous, but this is likely to break lots of code |
23:09:41 | OrionPK | lol |
23:10:14 | Araq | well it's easy to make the compiler warn about old [] usages |
23:10:22 | OrionPK | so is {} pragmas going to happen? |
23:10:28 | EXetoC | ugh |
23:10:38 | Araq | and then people can migrate their code easily |
23:10:57 | Araq | OrionPK: make a forum post and ask around |
23:11:07 | OrionPK | I don't like the generics one |
23:11:16 | OrionPK | psh |
23:11:27 | Araq | I think the {. .} should stay but I can be convinced to support {} too |
23:11:53 | Araq | OrionPK: the generics one I'm talking about are rarely used |
23:12:21 | OrionPK | the nim forum support polls? |
23:12:39 | Araq | no ... but if you're lucky some people answer |
23:12:54 | gradha | like the camelcase poll |
23:13:24 | OrionPK | heh |
23:13:42 | OrionPK | people don't get fired up about small things |
23:13:43 | Araq | zahary: in fact "nimrod pretty" works quite well, we can make it transform foo[a, b] into foo[.a, b.] automatically |
23:14:08 | zahary | yeah, I figured |
23:14:09 | OrionPK | but they might lean way or the other just not enough to say anything |
23:15:03 | zahary | I'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:39 | Araq | well a[b] has some problems when it comes to `[]` and auto-bind in templates |
23:15:54 | Araq | and [. .] mitigates this issue |
23:16:33 | Araq | but alright, lets keep it the way it is |
23:16:44 | Araq | we're optimizing for popularity these days |
23:16:45 | zahary | OTOH, 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:53 | zahary | advocated the use |
23:16:55 | Araq | I know |
23:18:59 | zahary | I'll be off to bed, good night |
23:19:10 | gradha | good night, honey badgers |
23:19:18 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again) |
23:19:27 | Araq | alright good night |
23:21:28 | Demos__ | is devel fixed on windows? |
23:21:45 | Araq | I think so |
23:22:41 | EXetoC | zahary: and it has no impact on either inference or default types? |
23:23:37 | EXetoC | the use of typedesc instead of [] |
23:23:45 | EXetoC | BitPuffin: you don't like that, right? |
23:24:11 | Araq | EXetoC: sure it has some impact [] are optional for a start |
23:24:33 | Araq | he wants to use typedesc when it's mandatory |
23:25:30 | * | darkf joined #nimrod |
23:34:50 | Demos__ | OK it built |
23:34:59 | Demos__ | strangely it would not build using icc |
23:40:53 | * | familiar125 joined #nimrod |
23:42:26 | EXetoC | mandatory 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:53 | Araq | no that's not what he meant afaict |
23:42:54 | * | dom_familiar joined #nimrod |
23:43:08 | Araq | hi dom_familiar |
23:43:25 | dom_familiar | welcome Araq |
23:43:36 | dom_familiar | Well... this doesn't work at all OrionPK |
23:43:51 | Araq | ha I knew it was you |
23:43:57 | Araq | do you know why? |
23:44:06 | Araq | cause your nick starts with 'dom' ... |
23:45:36 | * | dom_familiar quit (Remote host closed the connection) |
23:45:47 | EXetoC | alright nevermind |
23:46:07 | dom96 | Araq: Well done. |
23:51:51 | Demos__ | goddamn, I dont like c# as a language but the general "design for tooling" objective produced some amazing results |
23:52:24 | Demos__ | 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:08 | Araq | BitPuffin: still not sleeping? |
23:59:43 | OrionPK | whats up dom_familiar |
23:59:49 | OrionPK | what doesnt work |