00:05:42 | * | darkf joined #nimrod |
00:07:58 | NimBot | Araq/Nimrod devel 08c5ff3 Araq [+0 ±1 -0]: merge issue #707 by hand |
00:07:58 | NimBot | Araq/Nimrod devel a0e0cf2 Araq [+0 ±2 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
00:09:00 | NimBot | Araq/Nimrod devel cf59697 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds AllChars constant to strutils. |
00:09:00 | NimBot | Araq/Nimrod devel 38119e7 Andreas Rumpf [+0 ±1 -0]: Merge pull request #834 from gradha/pr_adds_strutils_const... 2 more lines |
00:11:13 | NimBot | Araq/Nimrod devel efd71c0 Michał Zieliński [+0 ±1 -0]: Normalize whitespace in osproc.nim. |
00:11:13 | NimBot | Araq/Nimrod devel 606efac Michał Zieliński [+0 ±2 -0]: Introduce poEvalCommand, poUsePath, fix remaining quoting issues.... 5 more lines |
00:11:13 | NimBot | Araq/Nimrod devel 7722dad Michał Zieliński [+0 ±2 -0]: Merge branch 'osproc' into devel... 4 more lines |
00:11:13 | NimBot | Araq/Nimrod devel 6324664 Michał Zieliński [+24 ±40 -19]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel... 3 more lines |
00:11:13 | NimBot | 1 more commits. |
00:18:01 | Araq | dom96: is https://github.com/Araq/Nimrod/pull/824 fine with you? |
00:20:26 | dom96 | yeah |
00:22:16 | * | Raynes quit (Ping timeout: 252 seconds) |
00:22:27 | * | Raynes joined #nimrod |
00:22:47 | * | Raynes quit (Changing host) |
00:22:47 | * | Raynes joined #nimrod |
00:23:02 | reactormonk | Araq, yup. But I had something that yielded me the results horizontally, but I needed them vertically, to feed them into the product proc. |
00:23:44 | Araq | reactormonk: I don't think this should be in algorithm.nim |
00:23:55 | Araq | and the more we have, the more we need to maintain |
00:24:03 | EXetoC | Araq: and bi-directional AST/source code translation is always possible? because somehow you need to be able to get a hold of the address in the case of 'let' |
00:24:26 | Araq | EXetoC: not sure what you mean |
00:24:39 | reactormonk | Araq, what's the distinction between algorithm.nim and sequtils.nim? |
00:24:47 | reactormonk | ... and where should it go? |
00:25:12 | Araq | reactormonk: don't add it just because you needed it once in your lifetime |
00:25:59 | reactormonk | Araq, if you say so |
00:26:14 | reactormonk | sounds useful to me |
00:27:58 | reactormonk | Araq, I'll come back if I need it a second time |
00:29:02 | Araq | yup |
00:29:22 | Araq | dom96: sockets.readLine should always call socket.SocketError() and not osError? |
00:29:28 | reactormonk | Araq, https://github.com/Araq/Nimrod/pull/859 |
00:30:22 | Araq | reactormonk: please learn how the tester works |
00:30:47 | Araq | you need a discard section with a 'spec' that tells the tester the supposed output |
00:31:01 | reactormonk | Araq, doesn't work by just erroring out? |
00:31:03 | Araq | otherwise it won't run the test, but only compile it |
00:31:07 | EXetoC | Araq: I mean, if you want to avoid a copy. you'd need to treat "let x" as a var, but then you need the address |
00:31:12 | dom96 | Araq: Yeah, I think most (if not all) OSErrors in sockets.nim should be turned into SocketError |
00:31:24 | Araq | ok |
00:31:34 | reactormonk | Araq, so is discard """ """ good enough? |
00:32:44 | Demos | reactormonk, probably not, just open another test and copy the format |
00:34:25 | EXetoC | "proc p(var x: T); let x = p()" -> "proc p(var x: T); let x: T; p(???)" |
00:34:34 | Araq | reactormonk: no, it's not. rtfm |
00:35:26 | Araq | EXetoC: the compiler can take the address of a 'let' variable internally. no problems here |
00:35:56 | reactormonk | Araq, should I write an issue about unittest and the compiler tester and assign it to zah? |
00:36:12 | Araq | no |
00:36:22 | Araq | the tester supports unittest already |
00:36:37 | Araq | but I don't want the tests to use it |
00:38:59 | NimBot | Araq/Nimrod devel f28c1ca Araq [+0 ±2 -0]: merged #811 against devel |
00:38:59 | NimBot | Araq/Nimrod devel 361520b Araq [+0 ±2 -0]: merged #823 against devel |
00:38:59 | NimBot | Araq/Nimrod devel 7836007 Araq [+0 ±3 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
00:40:45 | reactormonk | Araq, a simple exitvalue isn't good enough? :-/ |
00:42:53 | Araq | Varriount: I can't pull your PR anymore :-/ can you submit again? |
00:43:58 | reactormonk | btw, done. |
00:45:22 | Araq | btw I really prefer output: 'Success' but w/e |
00:45:46 | Araq | koch tests cat sets |
00:45:55 | Araq | koch tests --print html |
00:46:01 | Araq | fyi |
00:46:47 | NimBot | Araq/Nimrod devel 2f24f8c Simon Hafner [+1 ±1 -0]: sets equivalence |
00:46:47 | NimBot | Araq/Nimrod devel 593acdd Simon Hafner [+0 ±2 -0]: corrected docs and tests |
00:46:47 | NimBot | Araq/Nimrod devel a0b541d Simon Hafner [+0 ±1 -0]: added test specs for the tester |
00:46:47 | NimBot | Araq/Nimrod devel cc3c10c Andreas Rumpf [+1 ±1 -0]: Merge pull request #859 from reactormonk/sets_equivalence... 2 more lines |
00:50:09 | EXetoC | Araq: right, because it's an internal macro rather than a user-defined one |
00:50:18 | reactormonk | good |
00:51:06 | EXetoC | holy moly |
00:52:48 | EXetoC | that's nice |
00:55:29 | * | brson quit (Ping timeout: 240 seconds) |
00:57:40 | * | aruniiird quit (Quit: Leaving) |
00:58:29 | Demos | wow way to go microsoft. I am crashing and I find that in the probable place of the crash there is try {stuff that involves the FFI and unmanaged code} catch(Exception e){} |
00:58:31 | NimBot | Araq/Nimrod devel 4eab8ae Araq [+0 ±1 -0]: added the parts of #541 that I like |
00:58:31 | NimBot | Araq/Nimrod devel 94a7ecd Araq [+1 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
01:01:11 | NimBot | Araq/Nimrod devel 95a44d5 Dominik Picheta [+0 ±1 -0]: Fixes docgen for logging module. |
01:09:05 | EXetoC | I'm now trying to figure out why those changes to the compound assignment operators for floats were necessary |
01:10:54 | * | zggh joined #nimrod |
01:13:36 | EXetoC | the changes to the parameters anyway. I thought "var x = 1.0f32; x += 1" didn't work before, and it looks like it shouldn't. does the compiler handle that in a special way? |
01:18:21 | Araq | no, but it should work, I think |
01:18:26 | Araq | hi zggh welcome |
01:19:07 | zggh | hi |
01:19:32 | EXetoC | then I don't know what the semantical difference is. I was referring only to the argument changes though |
01:20:25 | EXetoC | perhaps there is none, but it does introduce a previously broken/unimplemented feature |
01:21:46 | Araq | yeah and I think there is still a bug left there |
01:22:27 | EXetoC | oh |
01:28:04 | Varriount | Araq: Again? This is the third time. :/ |
01:29:06 | Araq | Varriount: sorry, I dunno why github tells me it can't merge |
01:29:20 | Araq | will merge it immediately this time, I promise |
01:29:52 | dom96 | Araq: Probably have to resolve some conflicts. |
01:29:57 | dom96 | You can merge it manually. |
01:30:24 | Varriount | No, I'm getting it done. |
01:30:47 | dom96 | Varriount: What happened to your builders? |
01:32:30 | Varriount | dom96: They won't work until the testing bit is fixed. |
01:35:11 | Araq | Varriount: that is fixed |
01:35:41 | Varriount | Ok. After I get the new pull request out, I'll set them back up |
01:36:55 | dom96 | Random question: who's most likely to win the superbowl? |
01:37:30 | Araq | dom96: me |
01:38:00 | Varriount | You're asking the wrong US American. |
01:38:10 | Varriount | I don't watch sports. :3 |
01:39:25 | * | dmac joined #nimrod |
01:39:34 | dom96 | For some reason my friend is organising bets, even though the Superbowl is very unpopular here. |
01:39:48 | dom96 | I know literally nothing about it. |
01:40:18 | Varriount | Your friend would probably have more luck over here in the US |
01:40:38 | Varriount | Maybe we should have some sort of foreign-exchange program for programmers. |
01:42:25 | dom96 | Varriount: Yes, set one up and fly me over there :P |
01:43:34 | Varriount | I was thinking more like your friend and I could switch. Then I could come harass you even more over your coding style. >:3 |
01:45:11 | dom96 | hah. My friend isn't much of a programmer. |
02:00:40 | Varriount | Araq: I have the pull request ready. |
02:02:02 | dom96 | 'night |
02:06:08 | NimBot | Araq/Nimrod devel 12fba8d Clay Sweetser [+0 ±2 -0]: Added symlink procs |
02:06:08 | NimBot | Araq/Nimrod devel 105e721 Andreas Rumpf [+0 ±2 -0]: Merge pull request #861 from Varriount/os/add-linkprocs-prettyplease... 2 more lines |
02:06:26 | Araq | good night |
02:06:36 | Varriount | Good night |
02:17:21 | reactormonk | hmm, toSeq uses add, which isn't defined in sets? -.- |
02:17:34 | * | aruniiird joined #nimrod |
02:18:26 | reactormonk | how do I convert TSet[TItem] to a seq? |
02:18:39 | reactormonk | toSeq gives me |
02:18:41 | reactormonk | lib/pure/collections/sequtils.nim(204, 20) Error: type mismatch: got (seq[TSet[TItem]], TItem) |
02:20:49 | reactormonk | fixed it somehow |
02:20:50 | reactormonk | planetary_interaction.nim(99, 30) Error: type mismatch: got (seq[TEdge], seq[seq[TEdge]]) |
02:20:57 | reactormonk | system.add(x: var seq[T], y: T) |
02:21:09 | reactormonk | huh... |
02:21:17 | reactormonk | hmmmmm |
02:21:34 | reactormonk | can't even say it's wrong :-/ |
02:22:22 | Varriount | reactormonk: I do think that the 'zip' proc should A: Be made into an iterator, and B: Allow more than two arguments (like the transpose proc from yesterday) |
02:24:00 | fowl | reactormonk, toseq takes an iterator |
02:24:12 | fowl | reactormonk, toseq(items(myset)) |
02:37:57 | * | achim quit (Ping timeout: 248 seconds) |
02:38:55 | * | achim joined #nimrod |
02:45:22 | * | brson joined #nimrod |
03:24:00 | reactormonk | fowl, ok |
03:26:48 | * | aruniiird quit (Ping timeout: 245 seconds) |
03:33:30 | Varriount | Goodnight guys. |
03:36:31 | EXetoC | bye |
03:36:48 | * | xtagon joined #nimrod |
03:38:56 | * | aruniiird joined #nimrod |
03:46:25 | EXetoC | we *do* have support for asynchronous process communication, in osproc. great |
03:46:59 | * | dmac quit (Quit: Leaving) |
04:06:58 | * | ddl_smurf quit (Quit: ddl_smurf) |
04:10:48 | * | barry quit (Quit: Leaving) |
04:44:36 | * | [1]Endy joined #nimrod |
04:54:15 | * | [1]Endy quit (Ping timeout: 272 seconds) |
04:56:15 | * | [1]Endy joined #nimrod |
05:09:35 | Varriount | hi xtagon, aruniiird |
05:13:16 | * | psquid quit (Excess Flood) |
05:14:31 | * | psquid joined #nimrod |
05:27:56 | Demos | is type TFoo {.Pure.} = object of TObject; type TBar {.Pure.} = object of TFoo equivalent to TBar = object[base: TFoo]? |
05:28:06 | * | aruniiird quit (Ping timeout: 252 seconds) |
05:35:46 | xtagon | Hi Varriount |
05:38:56 | Varriount | xtagon: Things going well? Whatcha working on? |
05:39:31 | xtagon | Varriount, web development side project of mine. Wish it were in nimrod :) |
05:40:06 | Varriount | xtagon: We have a static website framework, 'Jester' - developed by dom96 |
05:40:51 | xtagon | Varriount, yeah, I've played with Jester and Nimweb. What I really want is a full-blown MVC framework like Ruby on Rails. |
05:41:06 | Varriount | Actually, that reminds me of this forum post -> http://forum.nimrod-lang.org/t/351 |
05:43:16 | Varriount | Demos: I'm not entirely sure. I didn't know we had an object[base: foo] syntax |
05:43:36 | Demos | Varriount, no idea if that is correct code or not |
05:43:51 | Demos | I just did not want to indicate the newline in IRC |
05:44:16 | Demos | it is consistant with tuple[...] |
05:44:31 | Varriount | We can do that with tuple? |
05:44:41 | Demos | yeah, the docs use that for tuple |
05:44:41 | Varriount | Demos: Could I get an example? |
05:44:56 | Demos | http://build.nimrod-lang.org/docs/manual.html#tuples-and-object-types |
05:45:31 | Varriount | Demos: What about the 'base' thing? |
05:45:41 | Demos | erm that is just a member |
05:45:41 | Demos | base is the name of that member |
05:45:51 | Demos | it is of type TFoo |
05:47:11 | Varriount | Demos: I don't think so. iirc, You wouldn't be able to pass TBar to procs accepting a TFoo if you used that latter case |
05:47:51 | Varriount | xtagon: Demos, dom96 and I just got over a nasty hurdle in some code interfacing with window's io completion port api |
05:47:51 | Demos | well yeah, but you could cast the TBar to a TFoo and get the expected behavior |
05:48:16 | xtagon | Varriount, what are the ramifications of that? |
05:48:16 | Demos | I should have said "do they have equivalent memory layouts" |
05:49:26 | Varriount | xtagon: Well, in the future, fixed async interprocess communication for the osproc module, a windows implementation of the fsmonitor module, and better windows support for dom96's (upcoming) event loop framework |
05:49:36 | fowl | Demos, no |
05:50:06 | fowl | Demos, inheritable objects have a type field |
05:50:16 | Demos | but pure suppresses it |
05:50:31 | Demos | or do I get the type field from TObject? |
05:50:56 | fowl | type x = object{.inheritable.} |
05:50:56 | fowl | sizeof(x).echo |
05:51:46 | fowl | it comes from inheritable |
05:52:56 | Varriount | fowl: I thought {.pure.} supressed only the run-time type info data only, not the |
05:52:56 | Varriount | compile time type info |
05:53:56 | fowl | pure doesnt do anything useful for object types anymore |
05:54:16 | xtagon | Varriount, Demos, dom96: awesome, good work! |
05:55:11 | Demos | is there a way to get objects that have a memory layout of a C struct that I can inheret from? |
05:55:36 | fowl | Varriount, RTTI is needed for inheritable types, so that things can work later like safe conversions and method dispatch |
05:56:16 | Demos | I can live without method dispatch and base -> derived conversions |
05:56:36 | fowl | then what do you need inheritance for |
05:56:46 | xtagon | G'night everyone |
05:56:46 | * | xtagon quit (Quit: sleeps) |
05:58:16 | Demos | because I am calling C code that expects structs that follow visual c++'s memory layout, and being able to use inheratance to plop down base class vtables would be nice. Although since I will have to change the pointer type anyway... |
05:59:11 | * | [2]Endy joined #nimrod |
06:00:36 | Varriount | Demos: Maybe the C++ compiler would help? Or the 'emit' pragma? |
06:01:11 | fowl | Demos, you can use cpp mode, though i dont think it will be easy to describe a virtual function |
06:01:11 | Demos | yeah |
06:01:31 | fowl | Demos, this was a workaround i used for sfml https://github.com/fowlmouth/nimrod-sfml/blob/master/sfml.nim#L28 |
06:01:41 | Demos | I am currently just writing out the vtbls |
06:01:56 | Varriount | Also, I don't know how friendly nimrod's c++ generation is with vcc. I tried it, and got a bunch of cast errors |
06:02:16 | Demos | what does importc do on object decls |
06:02:56 | * | [1]Endy quit (Ping timeout: 272 seconds) |
06:03:16 | fowl | uses something from c |
06:03:26 | fowl | instead of declaring the object |
06:03:36 | Varriount | Demos: How do I open up the command line console in VS? |
06:03:36 | fowl | the object then is just a nimrod interface to c |
06:03:36 | Demos | oh, allright |
06:03:51 | Varriount | The one analogous to the SDK Command line |
06:04:46 | Demos | there should be a start menu shortcut to it on VS < 2013, on VS2013 use the Visual Studio Tools shortcut and that folder contains a link to the command line |
06:05:26 | Varriount | And of course, it's not available in the actual IDE? |
06:06:16 | Demos | not really, what are you trying to do? |
06:06:31 | Demos | and what does the header pragma do? |
06:06:41 | Varriount | Demos: See what version of cl I have |
06:06:56 | Varriount | Btw, which one do you have again? |
06:06:56 | Demos | yeah just open the command prompt from that shortcut |
06:07:16 | Demos | 18.00.21005.1 |
06:07:36 | Varriount | Ok, good, I'm up to date. |
06:09:31 | Varriount | Aaand I still get an error on dynamic allocation. Yay. |
06:09:56 | Varriount | I swear, I've had more trouble with vcc than I have with gcc, and that's saying something. |
06:11:36 | Varriount | Anyway, goodnight guys. See you tomarrow. |
06:11:36 | Demos | yeah vcc is kinda a piece of shit |
06:12:16 | fowl | Demos, can you compile chipmunk for me? (: |
06:12:36 | Demos | OK I know what I am going to do. Ima make like type IFooVtbl[T] = object ... and then use the T to change the type of "this" |
06:12:36 | Demos | and sure |
06:12:46 | Demos | what is chipmunk? |
06:12:46 | fowl | http://chipmunk-physics.net/downloads.php |
06:12:56 | fowl | 2d physics lib |
06:13:06 | fowl | they dont have windows binaries for some reason |
06:13:31 | fowl | Demos, are you writing a bridge from c++ to nimrod or c++ to c to nimrod or what u doing |
06:13:31 | Demos | don't you have a windows computer? |
06:13:51 | Demos | fowl, I am wrapping a COM library while I wait for my VS plugin to crash |
06:14:11 | fowl | is com c++? |
06:14:31 | Demos | I am planning on defineing CINTERFACE, so no |
06:14:31 | fowl | i have windows but i suck at compiling things on it |
06:15:31 | Demos | want 32 or 64bit |
06:15:56 | fowl | both would be coo |
06:16:56 | Demos | what linkage settings do you want |
06:18:56 | Demos | like what CRT should I link |
06:20:06 | Demos | it is linked to Multi-threaded DLL atm |
06:23:11 | fowl | ah i dunno standard windows settings |
06:25:06 | Demos | there is no standard. if you mix settings you will not be able to link |
06:25:06 | Demos | https://skydrive.live.com/redir?resid=BE38BDD0FF029113!17187&authkey=!ABV5YHG7LhbIaJ4&ithint=file%2c.7z |
06:25:16 | Demos | that has the dll and the MT DLL static library |
06:25:31 | Demos | no import library which is kinda strange, does not matter for nimrod though |
06:25:41 | Demos | 32bit |
06:26:16 | fowl | cool |
06:26:26 | fowl | this is 6.2.1 ? |
06:27:31 | Demos | I clicked download on the link you gave me |
06:27:31 | fowl | ty |
06:27:46 | Demos | no problem |
06:27:56 | Demos | not hard to compile though, what with cmake and all |
06:32:16 | Demos | hm using the markAndSweep GC seems to have fixed my segfaults |
06:52:16 | * | bbodi joined #nimrod |
07:00:16 | * | adoniscik joined #nimrod |
07:23:17 | Demos | ummm why did the compiler suddenly become case sensitive |
07:23:57 | Demos | I dont really like it and it really screws up the boot process |
07:36:37 | * | DAddYE joined #nimrod |
08:10:37 | * | aruniiird joined #nimrod |
08:15:47 | * | aruniiird quit (Ping timeout: 260 seconds) |
08:24:07 | * | Demos quit (Read error: Connection reset by peer) |
08:27:32 | * | aruniiird joined #nimrod |
08:36:17 | * | dmac joined #nimrod |
08:51:57 | * | io2 joined #nimrod |
08:53:07 | * | DAddYE quit (Remote host closed the connection) |
08:54:27 | * | DAddYE_ joined #nimrod |
09:08:38 | * | DAddYE_ quit (Remote host closed the connection) |
09:11:38 | * | aruniiird quit (Ping timeout: 240 seconds) |
09:12:18 | * | brson quit (Ping timeout: 272 seconds) |
09:15:18 | Araq | OrionPK: where is that leak example with getTime() again? |
09:19:08 | Araq | and how does it relate to bug #653 ? |
09:22:58 | * | DAddYE joined #nimrod |
09:24:38 | * | aruniiird joined #nimrod |
09:28:18 | * | XAMPP_ quit (Quit: Drink all the Booze; Hack all the Things; Kill all the Humans;) |
09:32:58 | * | DAddYE quit (Remote host closed the connection) |
09:33:18 | * | DAddYE joined #nimrod |
09:37:58 | * | DAddYE quit (Ping timeout: 272 seconds) |
09:52:38 | * | zahary joined #nimrod |
10:00:48 | * | adoniscik quit (Quit: Leaving) |
10:03:53 | * | Mordecai joined #nimrod |
10:04:08 | * | psquid quit (Ping timeout: 240 seconds) |
10:23:38 | * | zahary quit (Quit: Leaving.) |
10:34:53 | * | delian1 joined #nimrod |
10:38:58 | * | ddl_smurf joined #nimrod |
10:40:58 | * | _davidk_ quit (*.net *.split) |
10:40:58 | * | delian66 quit (*.net *.split) |
10:41:28 | * | _davidk_ joined #nimrod |
10:43:58 | * | aruniiird quit (Read error: Operation timed out) |
10:52:13 | * | vendethiel quit (Remote host closed the connection) |
10:53:48 | * | vendethiel joined #nimrod |
11:07:09 | * | bbodi quit (Quit: Leaving) |
11:14:39 | * | vendethiel quit (Remote host closed the connection) |
11:15:19 | * | vendethiel joined #nimrod |
11:35:59 | * | dmac quit (Quit: Leaving) |
11:52:59 | * | psquid joined #nimrod |
11:54:29 | * | Mordecai quit (Ping timeout: 252 seconds) |
12:01:09 | dom96 | Araq: The nimbuild website doesn't compile with devel. |
12:13:59 | Araq | dom96: ok |
12:14:27 | Araq | now that vm2 is not the big thing for 0.9.4 (since it's still too broken), can we get an async prototype instead? |
12:14:41 | Araq | just mark the API as highly experimental |
12:18:04 | dom96 | maybe if I can get my maths homework done |
12:20:10 | Araq | now that's exactly the answer that the people who wanna throw money at us want to hear |
12:23:30 | EXetoC | c(:) |
12:28:39 | * | zahary joined #nimrod |
12:34:12 | dom96 | Yep. Investors surely like to invest in products developed by the young generation, not old people ;) |
12:50:53 | * | zahary quit (Quit: Leaving.) |
13:18:47 | * | darkf quit (Quit: Leaving) |
13:38:01 | * | renesac joined #nimrod |
13:38:29 | renesac | hi |
13:38:34 | Araq | hi renesac |
13:38:49 | NimBot | Araq/Nimrod devel 28873f6 Araq [+0 ±4 -0]: cleaned up command expressions |
13:39:10 | renesac | now they are working again? |
13:40:18 | Araq | did they ever stop working? |
13:40:32 | Araq | now they are documented |
13:41:48 | renesac | not really, but when I left we were breaking things in our local copies |
13:43:21 | Araq | well please take a look then |
13:44:31 | renesac | ok, I will take a look latter |
13:47:16 | Araq | the only issue I'm aware of it that let x = foo a, b doesn't work |
13:47:28 | Araq | but I don't mind that at all |
13:52:39 | * | q66 quit (Quit: Leaving) |
13:55:30 | * | q66 joined #nimrod |
14:16:42 | * | foamz joined #nimrod |
14:16:46 | * | foamz left #nimrod (#nimrod) |
14:32:33 | * | zahary joined #nimrod |
14:44:52 | * | zahary quit (Quit: Leaving.) |
15:03:53 | OrionPK | araq did you find it |
15:04:23 | OrionPK | https://gist.github.com/onionhammer/7952099 |
15:05:08 | * | BitPuffin joined #nimrod |
15:17:28 | Araq | OrionPK: nope, thanks |
15:17:58 | Araq | dom96: it's the old immediate vs non-immediate bug again |
15:18:19 | Araq | you call 'map' and mean 'system.map' |
15:18:32 | Araq | but the compiler thinks you mean 'htmlgen.map' |
15:18:57 | Araq | and since htmlgen.map is immediate, overloading resolution doesn't work |
15:19:40 | Araq | I can fix it, but then the compiler will pick htmlgen.map consistently ... |
15:20:43 | Araq | htmlgen shouldn't use immediate macros ... |
15:20:56 | Araq | that's archaic |
15:24:17 | * | achim quit (Quit: Textual IRC Client: http://www.textualapp.com/) |
15:49:01 | Araq | bbl |
16:21:46 | Varriount | Araq: Any particular reason the zip, filter, and other related procs in sequtils.nim are procs, instead of iterators? |
16:47:29 | * | ddl_smurf quit (Quit: ddl_smurf) |
16:47:44 | NimBot | Araq/Nimrod devel 7410b83 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds convenience mapIt templates. |
16:47:44 | NimBot | Araq/Nimrod devel 56f2a3f Grzegorz Adam Hankiewicz [+0 ±1 -0]: Merge pull request #846 from gradha/pr_adds_mapit_templates... 2 more lines |
16:49:25 | * | DAddYE joined #nimrod |
16:52:24 | * | DAddYE quit (Client Quit) |
16:58:03 | Varriount | dom96: The builder still doesn't work. |
17:00:47 | * | DAddYE joined #nimrod |
17:01:17 | dom96 | Varriount: Does it still crash? |
17:01:52 | Varriount | I don't know. It fails when trying to copy the testresult html file to the outgoing directory' |
17:02:14 | Varriount | dom96: The html file doesn't exist |
17:02:38 | dom96 | delete koch.exe |
17:06:53 | * | gsingh93` joined #nimrod |
17:07:15 | Varriount | dom96: And for some reason, the 64 bit builder fails earlier, with another file cannot be found error |
17:11:39 | gsingh93` | Any idea why I'd be getting this error message when this function clearly exists in the threads module: Error: undeclared identifier: 'createThread' |
17:12:38 | Varriount | gsingh93: Use --threads:on |
17:14:00 | gsingh93` | Varriount: Thanks :) |
17:17:05 | * | gsingh93` left #nimrod ("ERC Version 5.3 (IRC client for Emacs)") |
17:24:31 | * | aruniiird joined #nimrod |
17:46:34 | BitPuffin | why isn't threads on by default btw? |
17:46:45 | BitPuffin | if you don't mind me just bashing in here |
17:51:03 | * | [1]Endy joined #nimrod |
17:53:38 | * | [2]Endy quit (Ping timeout: 264 seconds) |
17:58:15 | * | [2]Endy joined #nimrod |
18:01:15 | * | [1]Endy quit (Ping timeout: 245 seconds) |
18:02:53 | * | aruniiird quit (Ping timeout: 252 seconds) |
18:04:15 | * | luyang joined #nimrod |
18:04:15 | * | luyang quit (Changing host) |
18:04:15 | * | luyang joined #nimrod |
18:05:53 | BitPuffin | dom96: diddely wanna maybe play doto later? |
18:17:19 | BitPuffin | Or maybe I'll just play alone or sopm |
18:19:58 | * | luyang quit (Quit: Leaving.) |
18:34:51 | renesac | Araq: the command expression also don't works with anonymous procs as a parameter |
18:37:42 | renesac | not a big loss either, but it would be good if we could treat the last executed function in a expression differently... |
18:50:25 | * | Demos joined #nimrod |
18:52:16 | Demos | has that case sensitivity thing been fixed? |
18:56:21 | * | luyang joined #nimrod |
18:56:21 | * | luyang quit (Changing host) |
18:56:21 | * | luyang joined #nimrod |
19:02:41 | * | luyang quit (Quit: Leaving.) |
19:05:04 | * | Mat3 joined #nimrod |
19:05:07 | Mat3 | hi all |
19:09:25 | Araq | renesac: I consider this a feature ... it would be easy to allow though |
19:10:26 | * | Mat3 I assume this festure as some kind of restriction |
19:10:32 | Mat3 | ^feature |
19:12:43 | Araq | Mat3: yeah |
19:12:55 | Araq | Demos: afaict it has been fixed, yes |
19:14:18 | Demos | did someone just sneak a pragma in? |
19:15:05 | Araq | Demos: --cs:partial is documented |
19:15:16 | Demos | I know |
19:15:43 | renesac | Araq, ok, I'm adding it to the manual then |
19:15:53 | Demos | and it is indeed fixed. |
19:16:31 | Araq | renesac: ok, also 'if' can 'case' and 'try' expressions can't come after 'foo' |
19:17:06 | renesac | can I call them "complex expressions"? |
19:17:13 | Araq | sure |
19:17:26 | renesac | right |
19:22:21 | Mat3 | ciao |
19:22:33 | * | Mat3 quit (Quit: Verlassend) |
19:30:15 | renesac | the manual don't have anything on method call syntax or proprieties either, those are only described in the tutorial II |
19:51:08 | Araq | yeah I noticed, please add it |
19:51:27 | renesac | just copy from the tutorial, or rewrite it in other words? |
19:51:49 | Araq | s/you/one and it might be fine |
19:52:00 | renesac | ? |
19:52:23 | Araq | the manual uses 'one' not 'you' |
19:52:30 | renesac | oh, ok |
19:52:53 | Araq | and it general it should be much more precise but currently isn't |
19:53:04 | renesac | hum |
19:53:23 | Araq | well the manual should become a spec |
20:06:06 | * | zahary joined #nimrod |
20:14:58 | Varriount | Araq: Any particular reason the zip, filter, and other related procs in sequtils.nim are procs, instead of iterators? |
20:16:42 | Araq | iterators cannot be chained |
20:16:56 | * | luyang joined #nimrod |
20:16:56 | * | luyang quit (Changing host) |
20:16:56 | * | luyang joined #nimrod |
20:17:02 | Araq | well now that we have first class iterators, this changed |
20:17:23 | Araq | but chaining is the name of the game for filter etc. |
20:18:11 | Araq | after all, why iterator once over the input, when you can instead iterate 4x and then hope the optimizer optimizes it away (it doesn't) |
20:18:18 | Araq | *iterate |
20:19:01 | * | ddl_smurf joined #nimrod |
20:19:57 | Varriount | Wait, was that justification against using closure iterators? |
20:20:03 | Varriount | Also, hi ddl_smurf |
20:21:48 | Araq | Varriount: closure iterators didn't exist when sequtils was written |
20:22:17 | Varriount | I know. I'm asking if that was justification against adding that in now (I didn't entirely comprehend what you wrote) |
20:22:18 | Demos | also requireing iteration to involve hard-to-inline calls is not a great thing |
20:22:20 | * | luyang quit (Quit: Leaving.) |
20:22:22 | ddl_smurf | hi Varriount |
20:24:13 | Varriount | Demos: Look at this -> http://www.smorgasbordet.com/pellesc/ |
20:25:18 | Demos | Varriount, wow! looks like Visual Studio 6 |
20:25:49 | Araq | Demos: actually inlining is very simple to do, but currently nimrod doesn't do it |
20:25:55 | Varriount | Demos: I'm not talking about the IDE, Look at the compiler. |
20:26:07 | Demos | yeah, it supports C11 |
20:26:14 | Varriount | :D |
20:26:35 | Demos | however gcc is probably less buggy |
20:26:48 | Demos | and afaik that compiler is nonfree |
20:27:08 | Araq | visual studio supports c11 now? ugh. |
20:27:14 | Varriount | Araq: No |
20:27:17 | Araq | good. |
20:27:33 | Varriount | Demos: The compiler is free to download and use. |
20:27:47 | BitPuffin | does Araq not like C11? |
20:27:51 | Demos | right but it is not open source |
20:28:05 | Demos | and besides, if you really need C11 features you should consider not using C |
20:28:26 | BitPuffin | Demos: they are nice to have though, and become more portable if they are part of C. So meh |
20:28:50 | Varriount | Demos: That's what microsoft thought when deciding to stop implementing C standards after C89 |
20:28:54 | Demos | right but using C11 features means you become limited to the handful of compilers that support them |
20:29:41 | Varriount | Well, it would be nice to add nimrod backend support for pelles c compiler |
20:29:56 | Varriount | Araq: How does one go about adding another supported compiler? |
20:32:57 | Araq | Varriount: I added pelles C once, just forget it |
20:33:25 | Araq | Pelles C isn't used, produces bad code and pretends it's visual C++ when it clearly is not |
20:34:01 | Araq | it's also buggy though this might have been improved |
20:35:16 | Varriount | Aww. So much for my hopes. |
20:35:45 | Araq | what hopes? |
20:36:15 | Demos | nimrod does not generate code using C99 features afaik, although it does seem to someimes run into vcc's broken preprocessor |
20:36:27 | Varriount | Araq: Hopes of finding a free, native windows C compiler |
20:36:40 | Demos | like visual c? |
20:36:43 | Varriount | *that isn't vcc |
20:37:12 | Demos | it looks like pellas c is just as native as clang or gcc, it can not generate debug symbols |
20:37:24 | Demos | unless it can and just does not say so on the webpage :D |
20:37:56 | Varriount | :( |
20:37:56 | Araq | Varriount: there is only visual c++, llvm and gcc and perhaps intel's compiler left |
20:38:25 | Demos | if you want debug symbols in a pdb file you need to use visual c++ or intel c |
20:38:41 | * | zahary quit (Quit: Leaving.) |
20:38:45 | Araq | there are others, but nobody uses them |
20:39:19 | Varriount | And because nobody uses them, they aren't of high quality. Kind of a catch-22 |
20:39:23 | Araq | Borland C++, Watcom c++, Digital mars C++, LCC, etc. |
20:39:41 | Araq | I used every one of these |
20:40:05 | Araq | but they are all effectively dead |
20:40:36 | Varriount | Araq: Out of all the C compiler's you have used, which one did you prefer the most? |
20:42:13 | Araq | dunno, they all have/had their problems |
20:42:41 | * | luyang joined #nimrod |
20:42:41 | * | luyang quit (Changing host) |
20:42:41 | * | luyang joined #nimrod |
20:43:19 | Varriount | Hi luyang |
20:44:04 | Demos | icc is supah expensive (and has been generateing code that is ~20% /slower/ than gcc for integer heavy stuff, maybe my options are wrong), gcc is a large program, clang is hard to compile on windows and is a large program, vcc has a broken preprocessor and has slow compile times. |
20:46:23 | Araq | I recently tested vcc's optimizer and was underwhelmed with its side effect analysis capabilitites |
20:46:44 | Demos | yeah it tends to do just OK |
20:46:52 | Araq | though perhaps that was because I tested it with nimrod output |
20:47:12 | luyang | Hi Varriount |
20:47:15 | Demos | I am not sure if the C and C++ compilers differ in what kinds of optimizations they do |
20:47:15 | luyang | et al |
20:49:28 | Araq | BitPuffin: C11 is one big "fuck you, humanity". Instead of fixing essential things like the missing overflow checking integer ops then got envious of Fortran and added imaginary numbers. Oh wait that was C99. |
20:50:11 | Araq | ok, I take it back then and hate C99 instead |
20:50:54 | Varriount | Araq: Tell me again, which technological standards of today do you *not* hate? |
20:53:12 | Araq | Varriount: JSON :P but even that could easily be much better |
20:53:31 | * | [2]Endy quit (Ping timeout: 260 seconds) |
20:53:49 | Trixar_za | Digital Mars C++ and Borland? |
20:54:08 | Trixar_za | Funny enough I remember those |
20:54:30 | Varriount | Araq: Maybe C11 is just a conspiracy to annoy programmers away from C |
20:55:20 | Varriount | Araq: Does nimrod still have the option to use pelles c compiler in it? I'd be interested in the benchmarks, if nothing else. |
20:55:41 | Demos | I kinda doubt stuff would actually compile under pelles c |
20:55:59 | Varriount | Also, the latest version seems to have an "enable trap for signed integer overflow" options |
20:56:10 | Araq | Varriount: sure, try --cc:pcc |
20:56:26 | * | Varriount dives into the dark abyss |
20:56:42 | * | Araq is reading the wikipedia page to C11 |
20:56:45 | Araq | "The quick_exit function as a third way to terminate a program, intended to do at least minimal deinitialization if termination with exit fails" |
20:57:00 | Araq | yeah, that was really a missing feature |
20:57:02 | Varriount | Why add something so trivial? |
20:57:02 | Demos | just what we need |
20:57:31 | Araq | quick_exit ftw! when exit fails, there is stil quick_exit to try! |
20:57:46 | Araq | and when that fails, you can call super_fast_exit |
20:57:49 | Demos | and annex K (bounds checking) is just the microsoft _s functions right? |
20:58:10 | Araq | and then hyper_exit, this one pulls the plugger |
20:58:36 | Araq | as if crashing a C program was hard to do ... |
20:58:48 | Araq | that's just surreal |
20:59:43 | Demos | oh my god the _Generic thing is probably the uglyest implementation of any kind of generics ever |
21:00:23 | Demos | restrict is also REALLY dumb |
21:00:25 | Demos | imo |
21:01:26 | Araq | hey, we'll get 'restrict' too |
21:02:01 | Araq | though perhaps we can check callsites that it is adhered to |
21:03:29 | Demos | I guess I understand the rationale, but it seems to be a really quite dangerous feature. And few people seem to understand how it works |
21:03:34 | Varriount | Araq: Welp, you were right. Pelles C wasn't able to even be used to bootstrap nimrod. |
21:05:06 | Araq | Varriount: that could also be because we generate fishy C code though |
21:05:42 | Varriount | Error, -1 is an invalid array size.. |
21:06:34 | Demos | Varriount, that is probably because you had incorrect bitness |
21:07:00 | Varriount | Thats the same error I get from gcc or vcc when trying to use 32 bit nimrod with a 64 bit compiler (or vice-versa, I think) |
21:07:11 | Araq | that's a sanity check |
21:07:26 | Araq | so that nimrod and the C compiler agree on the size of a pointer/int |
21:07:32 | Demos | yeah you can pass the --cpu:... flag to nimrod to get the 64bit nimrod to generate code for 32 bit c compilers |
21:07:48 | Araq | we had lots of problems before this check was added |
21:07:49 | Demos | and same for 64 on 32 I think |
21:08:19 | * | luyang quit (Quit: Leaving.) |
21:10:00 | Varriount | Araq: Has it been a big hassle, restricting nimrod to using only c89 features? |
21:12:56 | Araq | not at all |
21:13:25 | Araq | C99 doesn't add anything of value, as I said |
21:13:42 | Araq | (at least not for a code generator) |
21:14:27 | Varriount | What about the multi-threading support C11 adds? |
21:15:35 | Araq | what about it? it's nice the standard caught up with reality |
21:16:14 | Araq | we use what the C *compiler/implementation* provides when it comes to multi-threading |
21:16:33 | Araq | well not only when it comes to multi-threading |
21:16:52 | Araq | for instance, nimrod can use computed goto if available |
21:17:15 | Varriount | Demos: I was thinking about how learning C/C++ is not about learning 1 language, but about learning at least 3: C/C++, the macro language that comes with the two, and whatever tedious build script system chosen to bind things together. |
21:17:52 | Varriount | The fact that C11 generics are implemented as macros, of all things, is just... sad. |
21:18:13 | Demos | this is very true. You also need to know the basics of how linkers and compilers work |
21:18:26 | Varriount | Expecially because of the annoying escape characters needed to create multi-line macros. |
21:18:56 | Demos | well c macros are like a primitive build system that causes more trouble than it is worth |
21:19:51 | Demos | and yeah. Build systems suck, one of the coolest features of nimrod is that the compiler is essentially a build system |
21:20:39 | Demos | Varriount, that, and the scope issues, and the issues with ()s, and the trouble it causes for IDEs and analysis tools |
21:21:19 | Varriount | Issues with ()'s? |
21:22:29 | Demos | there is wierdness with precidence in macros, sometimes you need an extra pair of ()s |
21:22:44 | Araq | Varriount: about my 'hate' ... note that C is a very common language with lots of commercial support, billions of code lines written in it etc. It is a crime to not improve it by at least adding support for integer overflow detection. |
21:23:50 | Araq | And instead they added complex numbers! |
21:24:48 | Araq | These guys should be put into prison. I'm serious. |
21:27:41 | Varriount | Araq: I'll play devils advocate, and say that.. maybe no one at the standard could agree on a trivial way for compilers to implement such a thing? |
21:29:17 | Demos | or maybe some devices do not support overflow checking... |
21:30:23 | Varriount | Although, you have to admit, C's loses are nimrod's gain. |
21:30:30 | Araq | how is adding complex numbers less work for a compiler writer? makes no sense |
21:30:56 | Araq | Demos: yes, some do not, so add a #define so people can check whether it is available |
21:31:12 | Araq | and of course the hardware that lacks it belongs into a museum |
21:31:17 | Varriount | By the way, did you know that "Nim" is the name of a math game involving heaps? -> http://en.wikipedia.org/wiki/Nim |
21:31:25 | Demos | I agree, by the way |
21:31:56 | Araq | also, IMHO the hardware should change from wrap-around to saturated arithmetic for the common cases |
21:32:23 | Araq | it's much less bug prone and is nice when exceptions are not available |
21:32:59 | Varriount | Can hardware easily support that? |
21:33:15 | Araq | yes, I'm quite sure it can |
21:33:42 | Varriount | I thought that the wrap-around behavior was due to how arithmatic addition is done with binary numbers |
21:34:47 | Araq | special cases can easily be added to everything, just look at how the cpu deals with floating point |
21:35:45 | Varriount | True |
21:36:09 | Varriount | http://en.wikipedia.org/wiki/Saturation_arithmetic |
21:38:33 | Varriount | "Typically, general-purpose microprocessors do not implement integer arithmetic operations using saturation arithmetic; instead, they use the easier-to-implement modular arithmetic, in which values exceeding the maximum value "wrap around" to the minimum value, like the hours on a clock passing from 12 to 1." |
21:41:34 | Demos | I would think that it is nicer to implement because it is the same as what you would expect from unsigned arithmatic, that said modern CPUs implement a whole lot of stuff that is way harder than saturation arithmatic |
21:42:12 | Araq | yeah plus the school arithmetic doesn't work anyway |
21:42:29 | Demos | Varriount, can you install my visual studio extension and make sure it works on your copy of VS, I want to make sure it is not going into my source folder for resources |
21:43:27 | Araq | afaik a modern CPU mostly consists of caches anyway |
21:43:53 | Araq | if integer addition takes up twice the size nobody will notice |
21:45:30 | Araq | also that low(int) has no positive counterpart in 2's complement is a pita |
21:47:38 | Demos | well sure, but I think that is nessassary. Or at least something nasty is needed |
21:49:08 | Demos | you have 2n+1 numbers you would like to represent with a signed integer (zero and a handfull of positive and negative numbers) which is an odd number, you can add another zero if you want or get rid of an integer on one end |
21:50:23 | Varriount | Demos: Send me instructions, and I will do it as soon as I can. |
21:50:26 | Demos | you could also have one combination of bits that does not represent a number |
21:50:29 | Demos | http://sdrv.ms/1bl0Yxi |
21:50:32 | Demos | download VISX |
21:50:35 | Demos | install VISX |
21:50:36 | Demos | profit |
21:50:38 | Varriount | However, I am also writing an essay atm |
21:50:53 | Araq | Demos: just have 2 values for -Inf and 1 value for +Inf and call it a day |
21:50:53 | Demos | np, I am doing math and will probably eat lunch soon |
21:51:07 | Demos | buuuut the wasted bits :D |
21:51:25 | Araq | oh and with "saturated" I really mean, add +-INF |
21:52:00 | Araq | but hmm |
21:52:23 | Araq | +-INF can suck, requires special casing to turn down volume then |
21:52:43 | Demos | yeah, like I said you have to choose some badness |
21:52:55 | Demos | and having 2 -Infs is no picknik |
21:53:09 | Varriount | Demos: https://gist.github.com/Varriount/8775481 |
21:53:17 | Araq | why not? floats have 2 nulls |
21:53:38 | Araq | and NaN and subnormal numbers etc. |
21:53:39 | Demos | right you need visual studio Professional or above to install extensions |
21:53:52 | Demos | https://www.dreamspark.com/ |
21:54:13 | Demos | right because everyone handles IEEE754 correctly |
21:54:28 | Araq | IEEE went too far |
21:54:47 | Demos | IEEE754 is pretty OK. It does the job |
21:55:05 | EXetoC | meep |
21:55:12 | Demos | if it did not go so far there would be 30 different ways of doing everything it left out |
21:55:38 | Demos | anyway instead of having 2 -Infs and one Inf you could just have 2 zeros |
21:55:52 | Demos | 111... and 000... |
21:57:01 | Varriount | Demos: Only 32 bit versions available? |
21:57:23 | Demos | yeah visual studio is a 32bit application |
21:58:01 | Varriount | -_- |
21:58:14 | Demos | you probably want visual studio 2013 Pro. you should also check if your educational instatution has Dreamspark Premium (used to be MSDNAA) |
21:58:34 | Demos | although the version above pro offer little |
21:58:39 | Varriount | I really wish I knew how many of today's home computers were 64 bit, vs 32 bit |
21:59:34 | Demos | I am pretty sure that a huge majority are 64bit but a large segment of those are running a 32bit operateing system |
21:59:49 | Demos | since the upgrade path from XP->newer than XP keeps you on 32bit |
22:01:01 | Varriount | "New account creation failed. Please try again later" |
22:01:21 | Varriount | Also, I'm not sure my college has dreamspark available. |
22:01:30 | OrionPK | philip seymour hoffman :( |
22:01:56 | Araq | Demos: I think having 2 zeros is worse but w/e |
22:02:35 | Demos | yeah so do I. 2s complement solves that problem. My point was that you really can not win. At least everyone uses the same convention these days |
22:09:01 | Araq | no, what would that convention be? |
22:09:13 | Araq | it's undefined in C/C++ |
22:09:45 | Araq | but ok, even if the convetion is to wrap around, how many programs out there really deal with that? not many |
22:10:15 | Araq | the convention pretty much is to ignore what happens on overflow |
22:10:28 | Araq | so you might as well change the "convention" |
22:10:57 | Demos | well the convention means that we know what happens on overflow. You are correct that we tend not to deal with it |
22:25:20 | Varriount | It's too bad bigNum's aren't more popular. |
22:27:15 | Demos | I really think there are greater evils than integer overflow |
22:27:21 | Demos | like build systems |
22:29:18 | * | zahary joined #nimrod |
22:34:51 | Demos | msbuild is a fucking nightmare |
22:39:08 | renesac | I'm trying to write a nice example for command syntax, but the output of echo is ugly ('140' instead of '1 40') and 'sum' accepts only one argument (an openarray...) |
22:40:44 | Araq | renesac: use an ugly example then |
22:43:19 | renesac | nimrod only accepts varargs as the last argument in a function, right? |
22:43:35 | renesac | I really wanted a python3-like print function... |
22:43:38 | renesac | print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) |
22:45:18 | Araq | echo a, " ", b is not too bad |
22:45:32 | Araq | though perhaps indeed the " " should become default |
22:47:05 | renesac | well, it would break a lot of code |
22:47:13 | renesac | including your tests |
22:47:16 | Araq | yep |
22:47:39 | Araq | we could introduce an 'echos' that does the right thing with whitespace |
22:47:48 | renesac | well, you have the "print" word to use |
22:48:08 | Araq | true |
22:48:09 | renesac | make that oportunity to make a python like print |
22:48:27 | renesac | 'echo 1.0' shouldn't print '1.0000000000000000e+00' |
22:48:35 | Araq | except our print is better because it doesn't require () :P |
22:48:39 | renesac | and it should print anything you throw at it |
22:48:50 | Araq | yeah, ok |
22:48:50 | renesac | Araq, absolutelly ;) |
22:48:54 | Araq | I'm sold |
22:50:13 | renesac | another question is how to do formating, if new python way (that I find a bit verbose, but is pretty powerful) |
22:50:18 | renesac | or some other way |
22:51:10 | renesac | well, I think python really nailed printing to stdout |
22:53:06 | EXetoC | there's strutils.format. I think it'll be improved eventually |
22:53:31 | Demos | I am somewhat opposed to the idea of having echo do formatting. |
22:53:43 | Demos | better to format something than echo that tring |
22:53:45 | Demos | *string |
22:54:06 | EXetoC | having to import is a little annoying, that's all |
22:54:53 | renesac | echo and write() would remain |
22:55:03 | renesac | but print should have sane defaults |
22:55:10 | renesac | and nice formating |
22:55:24 | Varriount | EXetoC: You mean "having to import *it*" is annoying, right? |
22:57:25 | renesac | and I use frequently the "sep=" and "end=" options when I'm writing python3 |
22:57:32 | renesac | they are pretty handy |
22:59:47 | EXetoC | Varriount: yes, but nevermind |
23:01:18 | Araq | renesac: I'm curious, what do you use for sep and end? |
23:01:35 | Araq | only html tags come to mind apart from the usual whitespace |
23:01:49 | renesac | I normally use 'end=' '" when I don't want a new line after a print |
23:02:23 | renesac | and I sometimes use "sep=', '" or other things more visible than simply a small white space |
23:02:44 | renesac | depending on what I'm printing |
23:03:20 | renesac | or even 'sep=''" to manage my separators individually in the same way one would do with echo |
23:04:01 | renesac | oh, ' sep='\t' " is also handy |
23:06:18 | EXetoC | just throwing something out there: "print(fmt("$# $# $#", 1, 2, 3), end=" ", ...)" |
23:06:19 | renesac | but the priority would be an easy print with sane defaults, those optional tunings are nice but could be left for latter, as it needs modifications on how to treat varargs |
23:06:29 | EXetoC | but this can be simplified a great deal with some meta-programming |
23:06:55 | Araq | EXetoC: we can have the same syntax as python with a macro |
23:07:14 | EXetoC | right |
23:07:23 | Araq | a macro can take a variable number of arguments followed by keyword=value |
23:07:28 | renesac | hum |
23:07:38 | renesac | cool |
23:07:57 | Araq | well ok, not entirely as 'end' is a keyword, but that's a minor issue |
23:08:02 | renesac | so the most difficult part is getting the formating of everything pretty by default |
23:08:26 | Araq | yeah and that's a though one |
23:08:34 | renesac | yeap... |
23:08:48 | Araq | you can't use 'repr' because 'repr' sucks and would produce "abc" instead of abc |
23:09:04 | Araq | even if it wouldn't suck |
23:09:11 | renesac | and 0xb74c1028[3, 5, 9] |
23:09:25 | Araq | yeah but we could get rid of these finallly |
23:09:57 | Araq | and you can't use $ either because that does the wrong thing for floats |
23:10:11 | Araq | but we could change that at the cost of breaking code |
23:10:21 | Demos | I am all for a print(fmt(... type deal)) |
23:10:40 | renesac | I never undesrtood the $... in formating you usually want options |
23:11:04 | renesac | well, I guess it is a "tostring()" |
23:11:08 | Demos | well I think echo is more or less "get this to a console ASAP" |
23:11:11 | Araq | yes |
23:11:36 | Demos | and we know how well trying to do formatting options has worked out for C++ |
23:11:51 | renesac | well, it has worked for python |
23:11:54 | EXetoC | is $# less than four keystrokes for anyone? |
23:12:13 | Araq | renesac: you could use subexprs, you know ... |
23:12:15 | Varriount | renesac: Then make an easyEcho() proc :3 |
23:12:16 | renesac | EXetoC, three if you keep shift pressed |
23:12:31 | renesac | Varriount, we are discussing making a print macro |
23:12:35 | Araq | EXetoC: three here |
23:12:50 | EXetoC | ok |
23:12:58 | Araq | I picked $# because it's logical for me |
23:13:12 | Varriount | It's only two "keystrokes" if I use my phone. :D |
23:13:13 | Araq | and things like $2 $1 are handy for i18n |
23:13:37 | renesac | not if you are dealing with finance software |
23:13:38 | renesac | :P |
23:14:00 | renesac | (I hated latex for this) |
23:14:16 | Varriount | Make a define variable for the symbol then? |
23:14:22 | Demos | can you turn off $s being math mode in latex? |
23:14:26 | renesac | but it is acceptable |
23:14:31 | Demos | and use \( \) and \[ \] instead |
23:14:43 | renesac | Demos, no AFAIK... |
23:15:13 | renesac | and if you use %, _, etc it also aways try to correct your code, kindly inserting "missing $" for you |
23:16:14 | renesac | if they only have special meaning in math mode, WHY don't you let me use it normally outside it ???! |
23:16:23 | renesac | ok, getting offtopic here.. |
23:16:31 | Demos | no kidding |
23:16:35 | Varriount | Hey Araq, I have an idea that I think Demos will love |
23:16:39 | Demos | go on |
23:16:53 | Demos | although I don't know why araq would care about that |
23:17:10 | Varriount | Why don't we just abandon the whole "integrate a build system into the language" thing, and just use XML for everything? >:D |
23:17:32 | Demos | I will kill you with a fork |
23:17:55 | Varriount | What kind of fork? |
23:18:05 | Demos | a /> shaped one |
23:19:44 | Araq | Varriount: sounds like a plan. use a language built for semi structured data to describe an acylic graph of dependencies |
23:20:44 | * | XAMPP joined #nimrod |
23:20:54 | Varriount | What could go wrong? Apart from, say, be brutally murdered in our beds by a fork wielding assasin. |
23:20:59 | Varriount | *being |
23:21:09 | Araq | renesac: we can introduce proc printer[T](x: T): string = $x and proc printer(x: float): string and make 'print' call 'printer' ... |
23:21:34 | Araq | then people can also provide their own pretty printing for custom types |
23:22:02 | Araq | maybe we need a better name than 'printer' |
23:22:16 | renesac | tostring? format? |
23:22:21 | Demos | fmt is OK, and I thought `$` already did that? |
23:22:31 | renesac | fmt is ok too |
23:22:47 | Araq | meh, we already have 'strutils.format' |
23:23:04 | renesac | and we would still need to print custom types by defaut in a nice way |
23:23:08 | Araq | 'fmt' is too ugly, better call it 'pretty' then |
23:23:31 | renesac | and let them override it if they like, overloading |
23:23:42 | Araq | yes, as I said |
23:23:51 | Demos | how is this different from `$`? |
23:24:18 | Araq | Demos: $ for floats does the wrong thing |
23:24:31 | Araq | but I guess it's better to fix that instead |
23:25:05 | Araq | having both $ and pretty is annoying, but pretty defaults to $ so it's no big deal either |
23:25:05 | EXetoC | yes |
23:25:18 | renesac | the problem is just backwards compatibility... |
23:25:30 | Demos | we are not even at 1.0 so we can break that code |
23:26:02 | Demos | if you want the old behavior you could go echo uglyfloat(f) or soemthing |
23:26:17 | EXetoC | strutils.formatFloat |
23:26:21 | Demos | right |
23:27:03 | Araq | btw how do we format floats properly? |
23:27:18 | renesac | steal from python code? |
23:27:19 | Araq | I learned the hard way that %g doesn't keep precision |
23:27:47 | Araq | renesac: ok, very well |
23:30:15 | renesac | copying things from other languages that people are familiar reduce the cognitive load and learning curve |
23:30:26 | renesac | of course, we can only do it if we think they did that right |
23:32:04 | * | DAddYE quit (Remote host closed the connection) |
23:32:33 | Araq | zielmicha8: I'd really appreciate the vfork patch ... |
23:33:13 | EXetoC | I'm fine with just seeing a couple of decimals by default. python prints quite a few in many cases. it's easier to parse either way |
23:33:55 | * | Mordecai joined #nimrod |
23:34:58 | Varriount | For all you java lovers/haters out there -> http://blog.plover.com/prog/Java.html |
23:35:14 | Varriount | Disregard the title, it is written in sarcasm. |
23:35:27 | * | psquid quit (Ping timeout: 252 seconds) |
23:35:43 | * | DAddYE_ joined #nimrod |
23:36:24 | Varriount | My favorite line - "But when you learn Java, there aren't any powerful language features you can use to solve many problems. Instead, you spend your time learning a body of technique for solving problems in the language." |
23:38:16 | * | io2 quit () |
23:45:27 | * | DAddYE_ quit (Remote host closed the connection) |
23:55:59 | renesac | Varriount, old slides about design patterns: http://norvig.com/design-patterns/ |