00:02:21 | * | musicalchair quit (Ping timeout: 245 seconds) |
00:03:39 | * | musicalchair joined #nimrod |
00:03:59 | EXetoC | Araq: how do I make it work in this case? "typedef struct FT_FaceRec_* FT_Face;" |
00:04:54 | EXetoC | all the fields are publically available, and I've validated this in C |
00:05:18 | EXetoC | typedef struct FT_FaceRec_{...} FT_FaceRec; |
00:09:28 | Araq | type FT_FaceRecObj = object; FT_FaceRec = ptr FT_FaceRecObj |
00:15:16 | EXetoC | Araq: I mean by only using the header and importc pragmas |
00:16:59 | Araq | well yes that should work, no idea what you're asking |
00:26:20 | EXetoC | Araq: I'm asking how I can reference struct fields. I've tried numerous things involving the header and importc pragma on a type |
00:28:26 | Araq | well try it on the field: field {.importc: "namehere".}: cint |
00:28:41 | EXetoC | I remember seeing that |
00:31:52 | EXetoC | Araq: but then it uses '.' instead of '->'. how do I deal with that? |
00:34:46 | Araq | well you need to tell nimrod it's a ptr type to some struct/object |
00:34:55 | EXetoC | it compiles now. I specified the actual name rather than the typedef'ed name |
00:35:13 | psquid | Heh, just reading http://prog21.dadgum.com/187.html, and "Similarly, why would anyone compute a list of prime numbers at runtime--using some kind of sieve algorithm, for example--when you can copy a list of pre-generated primes?" sounds to me like a very good reason to use a language which can run code at compile-time - i.e., one with real macros. You can still have the code do exactly what you need, but you |
00:35:14 | psquid | no longer need to run it every time if the output never changes. |
00:37:05 | psquid | So nimrod being capable of that is definitely something I approve of. :P |
00:37:51 | EXetoC | Araq: no, I had to modify the importc argument |
00:39:19 | Araq | EXetoC: well I can't follow sorry. make a proper bug report if you want this thing sorted out. |
00:44:51 | EXetoC | Araq: is it a bug? I got that error when I did importc: "FT_Face" rather than importc: "FT_FaceRec" (typedef struct FT_FaceRec_{...}FT_FaceRec; typedef struct FT_FaceRec_* FT_Face;) |
00:47:29 | Araq | well make a bug report and I'll tell you |
00:47:44 | EXetoC | ok |
00:55:27 | * | brson quit (Ping timeout: 265 seconds) |
01:00:39 | * | brihat quit (Ping timeout: 240 seconds) |
01:01:04 | * | brihat joined #nimrod |
01:22:13 | * | brihat quit (Ping timeout: 248 seconds) |
01:27:53 | * | brihat joined #nimrod |
01:46:32 | * | brson joined #nimrod |
02:28:39 | BitPuffin | night! |
02:31:17 | * | fowl joined #nimrod |
02:33:09 | * | BitPuffin quit (Ping timeout: 248 seconds) |
02:34:33 | EXetoC | what purpose does importc on fields serve? the ability to omit the type? |
02:34:54 | * | hoverbear joined #nimrod |
02:35:11 | hoverbear | Can you do OpenCL code in Nimrod? |
02:36:07 | fowl | EXetoC, importc on fields is only needed if you are using a diff name than it uses in c |
02:45:04 | EXetoC | fowl: ok but what does it actually do? make sure that it exists? |
02:49:18 | fowl | huh |
02:51:29 | EXetoC | fowl: importc on types and fields |
02:52:12 | fowl | what are you saying |
02:52:20 | fowl | make sure it exists? what are you talking about |
02:54:02 | EXetoC | why use it on anything other than proc's? |
02:54:51 | fowl | so that you can access c types/structs/fields/etc |
02:55:54 | EXetoC | what's the difference compared to just declaring the same binary interface in nimrod? other than the fact that it involves a little more typing |
02:57:04 | EXetoC | is this related to exporting? |
02:57:09 | EXetoC | to C |
02:57:54 | fowl | you would be importing the header, all the functions and types in the c api, then not using the right types |
02:58:30 | fowl | plus the compiler might bitch about you passing tfoo* instead of struct foo* to its functions |
02:58:38 | fowl | the compiler as in gcc |
03:04:06 | EXetoC | fowl: so it saves me from importing proc's explicitly? I don't know how else that problem may arise |
03:05:27 | fowl | what problem? |
03:08:01 | EXetoC | fowl: tfoo* vs struct foo* |
03:15:15 | fowl | em |
03:15:27 | fowl | it will arise by |
03:15:33 | fowl | ok its like this |
03:15:56 | * | shodan45 joined #nimrod |
03:15:59 | fowl | int foo(struct bar *obj); right |
03:16:33 | fowl | nvm |
03:16:44 | fowl | i dont think i can explain this right |
03:17:03 | fowl | are you actually having a problem or are you just contemplating ways to use less letters in your wrapper |
03:18:57 | * | q66 quit (Ping timeout: 246 seconds) |
03:21:04 | EXetoC | fowl: yes, but isn't it only relevant when emitting C code? which is what I was thinking of doing |
03:21:42 | shodan45 | if I want to generate JSON, should I just manually build up a string, or is there a library that would be better? |
03:21:55 | fowl | shodan45, json module in stdlib |
03:22:17 | fowl | EXetoC, i dunno what you're asking me, i'll take a look if you want me to |
03:23:08 | shodan45 | fowl: yeah, I saw that, but it looks like it's mostly (only?) a parser |
03:23:50 | fowl | no you can use it to build too |
03:24:01 | fowl | see `%` operator and pretty() |
03:24:10 | shodan45 | fowl: hmm, ok |
03:27:29 | fowl | lol! http://thechangelog.com/raphters-a-web-framework-for-c/ |
03:29:56 | EXetoC | fowl: the whole point of importc on types and fields is to be able to interact with code emitted with 'emit' or whatever, right? |
03:30:03 | EXetoC | otherwise you just do it the c2nim way |
03:31:12 | fowl | no dude its to use them from nimrod |
03:31:55 | EXetoC | ok nevermind |
03:37:48 | EXetoC | I've never had to care about that, so I don't have a clue |
03:38:12 | EXetoC | might as well not care then :p |
03:40:36 | fowl | damnit man let me see your code so i know hwat your talking about |
03:51:15 | * | brson quit (Quit: leaving) |
04:01:32 | * | jimmt quit (Ping timeout: 265 seconds) |
05:03:38 | * | xenagi quit (Read error: Connection reset by peer) |
05:28:31 | * | isenmann joined #nimrod |
05:47:16 | * | ddl_smurf quit (Quit: ddl_smurf) |
06:21:50 | * | achim joined #nimrod |
06:42:00 | shodan45 | lol.... when playing around with a module, don't save your testing code with the same name as the module you're using :) |
06:42:49 | shodan45 | took me ages to figure out why my code wouldn't compile |
06:46:37 | * | jimmt joined #nimrod |
07:11:45 | * | hoverbear quit (Quit: Hibernating, be back soon.) |
07:11:51 | * | q66 joined #nimrod |
07:25:41 | * | achim quit (Ping timeout: 245 seconds) |
07:30:52 | * | achim joined #nimrod |
07:48:47 | * | achim quit (Quit: Textual IRC Client: http://www.textualapp.com/) |
09:52:35 | * | darkf quit (*.net *.split) |
09:52:35 | * | Icefoz quit (*.net *.split) |
09:54:34 | * | darkf joined #nimrod |
09:54:34 | * | Icefoz joined #nimrod |
10:16:58 | * | brihat quit (Read error: Operation timed out) |
10:25:52 | * | CarpNet joined #nimrod |
10:32:46 | * | ics quit (Ping timeout: 245 seconds) |
10:34:01 | * | ics joined #nimrod |
10:46:07 | * | silven joined #nimrod |
11:32:17 | * | radsoc joined #nimrod |
11:50:47 | * | HipsterPuffin joined #nimrod |
11:59:12 | Araq | 'importc' for fields only affects name mangling, nothing more, nothing less |
11:59:49 | Araq | name mangling for field names is only important if your wrapper uses .header |
12:00:20 | Araq | it's all pretty simple, I guess we need to improve the docs, as usual |
12:02:20 | Araq | bye |
12:02:26 | HipsterPuffin | Araq: Yep, documentation is king |
12:16:57 | EXetoC | ok that's a slightly more direct answer :p got it |
12:38:45 | * | achim joined #nimrod |
13:23:09 | * | achim quit (Quit: Computer has gone to sleep.) |
13:30:30 | * | brihat joined #nimrod |
13:49:23 | * | faassen joined #nimrod |
13:51:52 | * | darkf quit (Quit: Leaving) |
13:53:35 | * | ddl_smurf joined #nimrod |
14:07:45 | EXetoC | Araq: isn't the header pragma discouraged? |
14:10:36 | EXetoC | do you generate a dependency list before concatenating headers? |
14:15:36 | * | ddl_smurf_ joined #nimrod |
14:18:15 | * | silven quit (Ping timeout: 240 seconds) |
14:20:25 | * | silven joined #nimrod |
14:20:37 | * | fowl strangles EXetoC |
14:21:26 | HipsterPuffin | thats violent |
14:21:28 | * | HipsterPuffin left #nimrod (#nimrod) |
14:21:50 | * | Arcanum_za joined #nimrod |
14:22:34 | EXetoC | fowl: :o |
14:23:06 | * | PortableEXetoC joined #nimrod |
14:23:22 | * | neoirina joined #nimrod |
14:23:52 | * | ddl_smurf quit (*.net *.split) |
14:23:52 | * | OrionPKM quit (*.net *.split) |
14:23:52 | * | Roin quit (*.net *.split) |
14:23:52 | * | Trixar_za quit (*.net *.split) |
14:24:01 | * | ddl_smurf_ is now known as ddl_smurf |
14:25:12 | * | zielmicha joined #nimrod |
14:31:18 | * | Roin joined #nimrod |
14:31:36 | * | OrionPKM joined #nimrod |
14:37:32 | * | neoirina quit (Ping timeout: 260 seconds) |
14:57:12 | Araq | EXetoC: indeed I had a program to do that, let me see if it still exists |
15:00:18 | Araq | it's in tools/cmerge.nim |
15:00:35 | * | BitPuffi1 joined #nimrod |
15:03:34 | psquid | So I've been messing with seeing how far I can push static expressions, and it's pretty fun. Ran aground on trying to read a file in that manner, though, which is not entirely unexpected, but I feel like it still could be neat to have, so I hope I'm just missing something. |
15:03:57 | psquid | Specifically, this program: http://pastebin.ca/2508316 fails with this output: http://pastebin.ca/2508317 |
15:04:43 | OrionPKM | get rid of the word 'static' maybe |
15:05:08 | OrionPKM | use staticRead (i think thats what its called) |
15:05:59 | psquid | No dice on removing static alone (it wants a constant expression), but hm! That proc sounds rather more promising, yes. I'll go look for it. |
15:06:25 | OrionPKM | I think the static keyword opens a block |
15:06:48 | OrionPKM | http://nimrod-lang.org/manual.html#static_1979384223 |
15:08:16 | psquid | It works on expressions too, and all the expressions I've tried short of actual compile-time I/O seems to compile just fine when used after static like that. |
15:08:48 | psquid | And yeah, looks like it *is* staticRead. Cheers. :) |
15:10:05 | psquid | I'm guessing it needs some compiler magic (courtesy of being in system) that's missing when trying to do a static readFile, but being able to do it at compile-time at all is still fancy. :) |
15:13:40 | * | BitPuffi1 is now known as BitPuffin |
15:14:45 | * | aftershave quit (Ping timeout: 264 seconds) |
15:14:46 | * | OrionPKM quit (Read error: Connection reset by peer) |
15:14:46 | * | dymk quit (Quit: ZNC Bouncer Quitting) |
15:14:48 | * | ddl_smurf quit (Ping timeout: 264 seconds) |
15:14:48 | * | faassen quit (Ping timeout: 264 seconds) |
15:14:50 | * | Araq quit (Ping timeout: 264 seconds) |
15:14:50 | * | vendethiel quit (Ping timeout: 264 seconds) |
15:14:51 | * | Araq_bnc joined #nimrod |
15:14:55 | * | PortableEXetoC quit (Read error: Connection reset by peer) |
15:14:55 | * | Araq_bnc is now known as Araq |
15:15:12 | * | vendethiel joined #nimrod |
15:16:41 | * | aftershave joined #nimrod |
15:17:30 | * | OrionPKM joined #nimrod |
15:20:02 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
15:20:30 | * | BitPuffin joined #nimrod |
15:27:20 | * | brihat quit (Ping timeout: 264 seconds) |
15:27:21 | * | Araq quit (Ping timeout: 264 seconds) |
15:27:41 | * | Araq_bnc joined #nimrod |
15:27:43 | * | Araq_bnc is now known as Araq |
15:29:16 | * | BitPuffi1 joined #nimrod |
15:29:16 | * | BitPuffi1 is now known as 1JTABG83T |
15:29:16 | 1JTABG83T | Ahah |
15:29:16 | 1JTABG83T | Now I am a true hipster |
15:29:16 | 1JTABG83T | got a macbook through work |
15:29:16 | * | 1JTABG83T quit (Client Quit) |
15:30:32 | OrionPKM | cool? |
15:30:51 | BitPuffin | OrionPKM: sure |
15:31:17 | BitPuffin | OrionPKM: A bit of heresy, I kind of enjoy it so far |
15:31:27 | BitPuffin | although it can't beat my tiling wm ;) |
15:36:40 | psquid | Ooh, what do you use for tiling? |
15:37:06 | BitPuffin | psquid: on linux? |
15:37:46 | psquid | I was kinda partial to XMonad, but even after mostly wrapping my head around Haskell, it still had a lot of pain points where I couldn't find good documentation, or there was no good way to make the types match up for what I wanted. |
15:37:51 | psquid | BitPuffin: Yeah. |
15:39:04 | * | Icefoz quit (*.net *.split) |
15:40:22 | * | BitPuffin quit (Read error: Connection reset by peer) |
15:42:45 | * | BitPuffin joined #nimrod |
15:43:03 | BitPuffin | psquid: I use i3 on linux |
15:43:21 | BitPuffin | psquid: it is the best out of the ones I have tried :) |
15:43:29 | BitPuffin | (awesome, xmonad) |
15:44:17 | psquid | I did use XMonad, as you may have seen before your disconnect. Nowadays I tend to use dwm, though right now I'm on a box which just has a tweaked Fluxbox since that's what I grabbed first when testing, and with a dzen2 bar, maximized windows by default, and decorations off, it's close enough that I'm too lazy to fiddle any further. |
15:44:30 | * | brihat1 joined #nimrod |
15:44:30 | * | faassen1 joined #nimrod |
15:44:30 | * | _dymk joined #nimrod |
15:44:30 | * | Icefoz joined #nimrod |
15:44:45 | * | Jimmm joined #nimrod |
15:45:02 | psquid | Though I do have i3lock as my locker, since slock is a little *too* bare for my tastes. xD |
15:45:20 | psquid | And that's pretty nice, so I'll have to give the full WM a try. |
15:46:18 | * | PortableEXetoC joined #nimrod |
15:46:27 | BitPuffin | psquid: it's awesome |
15:46:44 | BitPuffin | psquid: check out the screencast and you will see immediately why I like it so much haha |
15:46:59 | psquid | But I thought awesome that was that other WM? |
15:47:01 | psquid | :P |
15:47:12 | psquid | s/that was/was/ |
15:47:33 | psquid | And ooh, screencast. |
15:48:27 | BitPuffin | psquid: herp herp :P |
15:49:24 | psquid | Oh nice, they have screencasts of some of the nitty-gritty technical details too. I like the thought of a WM developed by people who'd decide their users were interested in that. |
15:49:37 | * | psquid watches screencast(s?) |
15:51:05 | BitPuffin | ofc nimrod is already set up on my macbook lol :D |
15:51:11 | BitPuffin | just gotta get babel installed |
15:51:59 | * | ddl_smurf joined #nimrod |
15:52:01 | psquid | Ooh, so it does the "workspace created on activation, destroyed on deactivation if empty" thing that was about the only thing I *did* like when I tried GNOME 3. Good to see that feature exists in a WM I'm actually likely to like. |
15:52:09 | * | chat1 joined #nimrod |
15:52:11 | * | fowlmouth joined #nimrod |
15:52:58 | * | mal`` joined #nimrod |
15:54:57 | * | mal``` quit (Ping timeout: 248 seconds) |
15:55:01 | * | Zuchto quit (Ping timeout: 248 seconds) |
15:55:09 | * | _dymk quit (Ping timeout: 240 seconds) |
15:55:31 | psquid | BitPuffin: Ooooh, I *like* the stacking layout. I think that may be what hooks me once i3's emerged and running. xD |
15:55:56 | fowlmouth | bah |
15:56:03 | fowlmouth | fowl, begone |
15:56:21 | * | fowl quit (Disconnected by services) |
15:56:44 | * | jimmt quit (Ping timeout: 248 seconds) |
16:02:43 | * | psquid quit (Read error: Connection reset by peer) |
16:02:59 | * | Reisen quit (Ping timeout: 260 seconds) |
16:03:41 | * | Reisen joined #nimrod |
16:13:44 | * | psquid joined #nimrod |
16:15:58 | * | fowlmouth quit (*.net *.split) |
16:15:58 | * | isenmann quit (*.net *.split) |
16:15:59 | * | Zor quit (*.net *.split) |
16:15:59 | * | krusipo quit (*.net *.split) |
16:16:00 | * | ics quit (*.net *.split) |
16:16:01 | * | EXetoC quit (*.net *.split) |
16:16:01 | * | XAMPP quit (*.net *.split) |
16:16:01 | * | reactormonk quit (*.net *.split) |
16:16:01 | * | Reisen quit (*.net *.split) |
16:16:01 | * | BitPuffin quit (*.net *.split) |
16:16:02 | * | silven quit (*.net *.split) |
16:16:02 | * | orbitz quit (*.net *.split) |
16:16:03 | * | aftershave quit (*.net *.split) |
16:16:03 | * | chat1 quit (*.net *.split) |
16:16:04 | * | PortableEXetoC quit (*.net *.split) |
16:16:04 | * | bastian quit (*.net *.split) |
16:16:05 | * | oal quit (*.net *.split) |
16:16:05 | * | tumak quit (*.net *.split) |
16:16:06 | * | q66 quit (*.net *.split) |
16:16:07 | * | Kristina quit (*.net *.split) |
16:16:07 | * | Raynes quit (*.net *.split) |
16:16:07 | * | eigenlicht quit (*.net *.split) |
16:16:09 | * | comex quit (*.net *.split) |
16:16:11 | * | Jimmm quit (*.net *.split) |
16:16:11 | * | Araq quit (*.net *.split) |
16:16:11 | * | vendethiel quit (*.net *.split) |
16:16:11 | * | Roin quit (*.net *.split) |
16:16:11 | * | zielmicha quit (*.net *.split) |
16:16:12 | * | Amrykid quit (*.net *.split) |
16:16:12 | * | Kooda quit (*.net *.split) |
16:16:13 | * | joelmo quit (*.net *.split) |
16:16:13 | * | JStoker quit (*.net *.split) |
16:16:14 | * | Arcanum_za quit (*.net *.split) |
16:16:14 | * | radsoc quit (*.net *.split) |
16:16:14 | * | CarpNet quit (*.net *.split) |
16:16:14 | * | musicalchair quit (*.net *.split) |
16:16:14 | * | zahary quit (*.net *.split) |
16:16:14 | * | dom96 quit (*.net *.split) |
16:16:15 | * | Varriount quit (*.net *.split) |
16:16:15 | * | rndbit quit (*.net *.split) |
16:16:16 | * | zahary_ quit (*.net *.split) |
16:19:26 | * | shodan45 quit (Remote host closed the connection) |
16:19:45 | * | shodan45 joined #nimrod |
16:23:33 | * | Zor joined #nimrod |
16:23:33 | * | krusipo_ joined #nimrod |
16:23:33 | * | Reisen joined #nimrod |
16:23:33 | * | chat1 joined #nimrod |
16:23:33 | * | PortableEXetoC joined #nimrod |
16:23:33 | * | Jimmm joined #nimrod |
16:23:33 | * | BitPuffin joined #nimrod |
16:23:33 | * | Araq joined #nimrod |
16:23:33 | * | aftershave joined #nimrod |
16:23:33 | * | vendethiel joined #nimrod |
16:23:33 | * | Roin joined #nimrod |
16:23:33 | * | zielmicha joined #nimrod |
16:23:33 | * | Arcanum_za joined #nimrod |
16:23:33 | * | silven joined #nimrod |
16:23:33 | * | radsoc joined #nimrod |
16:23:33 | * | ics joined #nimrod |
16:23:33 | * | CarpNet joined #nimrod |
16:23:33 | * | q66 joined #nimrod |
16:23:33 | * | musicalchair joined #nimrod |
16:23:33 | * | zahary joined #nimrod |
16:23:33 | * | EXetoC joined #nimrod |
16:23:33 | * | dom96 joined #nimrod |
16:23:33 | * | orbitz joined #nimrod |
16:23:33 | * | XAMPP joined #nimrod |
16:23:33 | * | Varriount joined #nimrod |
16:23:33 | * | Amrykid joined #nimrod |
16:23:33 | * | reactormonk joined #nimrod |
16:23:33 | * | Kooda joined #nimrod |
16:23:33 | * | zahary_ joined #nimrod |
16:23:33 | * | bastian joined #nimrod |
16:23:33 | * | joelmo joined #nimrod |
16:23:33 | * | JStoker joined #nimrod |
16:23:33 | * | Kristina joined #nimrod |
16:23:33 | * | rndbit joined #nimrod |
16:23:33 | * | oal joined #nimrod |
16:23:33 | * | Raynes joined #nimrod |
16:23:33 | * | eigenlicht joined #nimrod |
16:23:33 | * | comex joined #nimrod |
16:23:33 | * | tumak joined #nimrod |
16:23:48 | * | fowlmouth joined #nimrod |
16:23:48 | * | PortableEXetoC quit (Ping timeout: 246 seconds) |
16:26:20 | * | dymk joined #nimrod |
16:26:40 | * | shodan45 quit (Remote host closed the connection) |
16:27:23 | * | aftershave quit (Ping timeout: 264 seconds) |
16:27:46 | * | shodan45_ joined #nimrod |
16:27:57 | * | faassen1 is now known as faassen |
16:28:22 | * | PortableEXetoC joined #nimrod |
16:29:12 | * | PortableEXetoC quit (Client Quit) |
16:38:56 | * | achim joined #nimrod |
16:39:05 | * | dymk quit (Ping timeout: 245 seconds) |
16:45:06 | * | hoverbear joined #nimrod |
16:48:51 | BitPuffin | dom96: wanna play some dota2 later? :P |
16:50:05 | dom96 | I doubt i'll have enough time so I'll say maybe. |
16:53:58 | BitPuffin | dom96: I don't really have either, but I wanna give it a shot lol |
16:56:39 | fowlmouth | someone play starbound with me |
16:56:52 | dom96 | Starbound has multiplayer? |
16:56:56 | fowlmouth | yea |
16:57:06 | dom96 | Buy me it and I just might play it :P |
16:57:19 | fowlmouth | linux torrents up at the piratebay |
16:57:44 | dom96 | but that's illegal :O |
16:57:46 | fowlmouth | make sure you get patches 3-6 |
16:58:02 | fowlmouth | what? i dont know what youre talking about |
16:58:03 | fowlmouth | wink |
16:59:16 | BitPuffin | fowlmouth: newb |
16:59:21 | * | dymk joined #nimrod |
16:59:27 | * | brson joined #nimrod |
17:00:00 | fowlmouth | you are newb |
17:01:19 | * | gradha joined #nimrod |
17:06:02 | gradha | psquid: you need staticRead because the default compile time implementation of nimrod can run only nimrod code, and IO depends on C backend |
17:06:10 | * | dymk quit (Ping timeout: 245 seconds) |
17:06:23 | gradha | psquid: so staticRead and staticExe (aka slurp/gorge) are shortcuts to avoid that restriction and be useful, but there's no staticWrite |
17:06:46 | gradha | psquid: however, these procs are obsoleted by the FFI support |
17:07:04 | gradha | psquid: when you compile with FFI you can use any C function at compile time |
17:07:18 | psquid | gradha: Aha, gotcha. :o |
17:07:59 | gradha | psquid: to have FFI you need to build koch with -d:useFFI IIRC |
17:08:17 | gradha | rather, you need to boot koch with -d:useFFI, as stated in the command line help |
17:09:26 | gradha | well, it's quite nice that there are only two hits for useFFI in the whole source tree |
17:12:54 | * | dymk joined #nimrod |
17:13:57 | OrionPKM | didnt realize nimrod had to be built differently for useFFI |
17:14:01 | Araq | gradha: useFFI uses an abbrev is therefore bad. your statistics lie, it's bad code. |
17:14:22 | EXetoC | Araq: I thought you were crazy enough to duplicate some of the effort for every header. this should make the porting bearable |
17:14:42 | OrionPKM | yep |
17:15:05 | gradha | Araq: my statistics lie? |
17:15:11 | OrionPKM | distnct |
17:15:50 | EXetoC | sometimes i get an error in a function definition, but I can just empty the body then |
17:17:00 | * | dymk quit (Ping timeout: 245 seconds) |
17:18:20 | * | dymk joined #nimrod |
17:19:30 | * | everlise quit (Remote host closed the connection) |
17:21:11 | * | achim quit (Quit: Computer has gone to sleep.) |
17:22:50 | * | dymk quit (Ping timeout: 245 seconds) |
17:23:00 | * | dimetrio joined #nimrod |
17:23:40 | Araq | hi dimetrio welcome |
17:26:12 | * | phonedisplay quit (Remote host closed the connection) |
17:26:12 | * | dimetrio quit (Remote host closed the connection) |
17:26:17 | EXetoC | :/ |
17:30:01 | * | Mordecai joined #nimrod |
17:30:25 | * | psquid quit (Ping timeout: 245 seconds) |
17:32:06 | Araq | hi Mordecai welcome |
17:33:17 | * | Mordecai is now known as psquid |
17:33:34 | psquid | I am not a fan of ping timeouts. xD |
17:47:27 | * | BitPuffin quit (Ping timeout: 260 seconds) |
17:50:24 | * | dymk joined #nimrod |
17:57:12 | * | dymk quit (Ping timeout: 260 seconds) |
17:57:13 | * | achim joined #nimrod |
17:59:38 | EXetoC | psquid: you don't like the feature, or the fact that it happens? |
18:00:03 | * | isenmann joined #nimrod |
18:00:37 | psquid | That it happens. I'm glad there's something in place for that situation, but not that there needs to be something. :P |
18:01:21 | * | brson quit (Ping timeout: 272 seconds) |
18:04:19 | * | dymk joined #nimrod |
18:04:20 | * | brson joined #nimrod |
18:08:49 | zielmicha | How do I convert cstring to string? |
18:09:01 | gradha | zielmicha: $variable |
18:09:28 | zielmicha | surprsing, I must say |
18:09:53 | dom96 | The answer to "How do I convert * to string?" is always ``$`` :P |
18:09:59 | dom96 | well, usually. |
18:10:12 | gradha | yeah, when you have a proc to convert ints to strings, it's shocking the same works for other types too |
18:11:48 | zielmicha | Does it copy cstring? |
18:12:59 | Araq | yes |
18:13:15 | gradha | zielmicha: I think it would break pretty badly if not, because a cstring is not traced IIRC, it could come from… gasp… C |
18:17:05 | gradha | do people use macros.newIdentDefs with a type but without a value? it seems the parameters should be the other way round, "name, value + kind = newEmptyNode" |
18:17:05 | gradha | or maybe have kind also newEmptyNode so users can call with named attribute, and rename default to value |
18:19:00 | * | DAddYE_ joined #nimrod |
18:19:26 | Araq | well it reflects the order in the AST |
18:19:41 | Araq | so it's as good as it gets imo |
18:20:16 | Araq | we need a better AST api but fixing individual procs won't get us there, I think |
18:21:29 | OrionPKM | the API to work with the AST is a bit unruly, but dammit if it isnt powerful |
18:21:39 | OrionPKM | I'm going to be abusing the shit out of macros now :P |
18:22:57 | OrionPKM | I think what we really need a good article on how to use it added to the documentation page |
18:23:20 | * | DAddYE_ quit (Remote host closed the connection) |
18:23:25 | OrionPKM | like the term rewriting macros page, but for general compile time code generation |
18:23:36 | OrionPKM | common examples |
18:23:52 | * | DAddYE joined #nimrod |
18:24:01 | gradha | but people don't read docs |
18:24:09 | OrionPKM | people love examples though |
18:24:12 | * | shodan45_ quit (Quit: Konversation terminated!) |
18:24:15 | OrionPKM | code samples > all |
18:24:16 | fowlmouth | gradha, example use of ident defs with a type but without a value: object fields, tuple fields, parameters, var declarations |
18:24:29 | OrionPKM | fowl's code examples helped me way more than the macros.nim doc |
18:24:30 | tylere | a "nimrod cookbook" would be immensally useful |
18:24:38 | tylere | mroe useful than api doc, even, imo |
18:25:04 | fowlmouth | tylere, most modules have an example at the bottom, in a when isMainModule: block |
18:25:24 | tylere | ahh |
18:25:25 | OrionPKM | dumptree and treeRepr are very helpful for figuring out the AST as well |
18:25:59 | tylere | a lisp macro macro would be funny. E.g. a macro that let you right nimrod expressions as sexps |
18:27:13 | gradha | tylere: there are for the other way round, but you could build a macro to parse text and convert that to AST I guess |
18:27:31 | OrionPKM | Im doing something like that for my templating module |
18:27:42 | tylere | the nice thing about sexps is they are basically a DSL for AST |
18:27:43 | gradha | why use parsing at all, use nested arrays |
18:27:58 | * | levkray joined #nimrod |
18:28:01 | OrionPKM | hmm? |
18:28:10 | tylere | I don't like actually coding in them, but could be handy for e.g. code generators |
18:28:30 | Araq | hi levkray welcome |
18:30:27 | * | CarpNet quit (Quit: Leaving) |
18:30:39 | * | levkray quit (Remote host closed the connection) |
18:30:39 | * | igushchin quit (Remote host closed the connection) |
18:31:02 | OrionPKM | https://dl.dropboxusercontent.com/u/417554/template.png |
18:31:03 | * | Araq stops greeting new people |
18:32:20 | * | brihat1 left #nimrod (#nimrod) |
18:32:24 | * | brihat1 joined #nimrod |
18:32:49 | * | brihat1 left #nimrod (#nimrod) |
18:34:04 | * | brihat joined #nimrod |
18:37:13 | * | brson quit (Ping timeout: 245 seconds) |
18:41:17 | * | brson joined #nimrod |
18:47:17 | * | birina joined #nimrod |
18:49:54 | * | issues quit (Remote host closed the connection) |
18:49:55 | * | birina quit (Remote host closed the connection) |
18:50:17 | * | shodan45 joined #nimrod |
18:52:13 | * | BitPuffin joined #nimrod |
18:55:25 | * | bankclub joined #nimrod |
18:55:38 | * | DAddYE quit () |
18:57:40 | * | brson quit (Ping timeout: 252 seconds) |
19:03:04 | * | bankclub quit (Ping timeout: 272 seconds) |
19:08:01 | gradha | so who has written a metamacro? |
19:11:02 | * | BitPuffin quit (Ping timeout: 240 seconds) |
19:15:04 | * | DAddYE joined #nimrod |
19:15:18 | * | aftershave joined #nimrod |
19:16:27 | * | BitPuffin joined #nimrod |
19:35:44 | * | Jimmm is now known as jenjimm |
19:54:46 | OrionPKM | is such a thing even possible |
20:00:39 | faassen | so anyone look at my bug yet? https://github.com/Araq/Nimrod/issues/748 |
20:00:43 | faassen | I'm curious what may be going on. |
20:00:56 | faassen | and oddly pleased I found what seems to be a compiler bug. :) |
20:01:53 | * | DAddYE_ joined #nimrod |
20:01:59 | gradha | OrionPKM: why not? |
20:03:25 | Araq | faassen: could be an ordinary stack overflow |
20:03:40 | OrionPKM | http://i.imgur.com/bwU4r.gif |
20:04:50 | fowlmouth | gradha, last i checked generating a template from a macro didnt work |
20:05:31 | * | DAddYE__ joined #nimrod |
20:05:46 | * | DAddYE quit (Ping timeout: 272 seconds) |
20:07:03 | gradha | I don't know why you would generate a macro from a macro, but a nnkMacroDef is there |
20:08:03 | faassen | Araq: I tried it with world on the heap too. |
20:08:26 | * | DAddYE_ quit (Ping timeout: 252 seconds) |
20:09:38 | faassen | Araq: if I did that right.. I created a PWorld that has a ref to TWorld and then did new(TWorld) and modified the display function to get the PWorld parameter. |
20:09:53 | Araq | faassen: the problem is likely iterators still suck for arrays and so make a copy on the stack |
20:10:14 | faassen | Araq: ah, yeah, that would do it. I didn't figure a copy was made. |
20:10:14 | Araq | doesn't matter if you allocate the primary world on the heap or not |
20:10:32 | faassen | Araq: ah, well, I hadn't considered that. I had considered stack overflows. |
20:11:05 | faassen | Araq: though it is odd that if you take TWorld out of it, and write the display for TGrid, things do work. |
20:11:23 | faassen | Araq: I'm not sure I see how that would make the stack so much smaller everything just works even with HEIGHT twice the size. |
20:12:23 | faassen | Araq: and if the iterator causes the stack overflow, it's also odd that a 'echo' in the first line of display would never be reached, right? |
20:12:47 | faassen | Araq: unless the function call itself causes that much stack space to be reserved? |
20:13:11 | Araq | that's usually the case, yes |
20:13:18 | Araq | the function call allocates a stack frame |
20:13:39 | Araq | the stack frame has space for any temporary arrays that you use |
20:13:59 | Araq | unless it fails of course |
20:21:32 | faassen | Araq: I'm not used to thinking about sufficiently advanced compilers. :) |
20:22:12 | Araq | well it keeps surprising me how bad modern C compiler still are |
20:22:26 | Araq | it's so easy to do better :P |
20:23:39 | faassen | what would the solution to this kind of issue be? it's kind of surprising to the naive developer. |
20:24:37 | faassen | where I'm the naive developer. :) |
20:26:04 | zielmicha | hey |
20:26:05 | zielmicha | I have a PR to merge (https://github.com/Araq/Nimrod/pull/737, "quoteIfContainsWhite -> quoteShell") |
20:26:45 | zielmicha | this time it's backward compatible |
20:28:00 | gradha | faassen: if iterators are the problem, iterate over indices and use those to access the variables https://gist.github.com/gradha/7993777 |
20:28:45 | * | Arcanum_za is now known as Trixar_za |
20:29:50 | Araq | faassen: well the proper solution is that the compiler should optimize properly |
20:30:16 | faassen | gradha: yeah, I just meant to ask a solution so that people who don't iterate over indexes but over values get surprises. I assume it's a better iterator for items and pairs for arrays. |
20:31:05 | faassen | Araq: yeah, I really want to just to be able to loop through values instead of indexes without worry. |
20:31:51 | faassen | Araq: modify them too, preferably. I think that's the least unexpected behavior for just plain for on an array without explicit invocation of iterators. |
20:32:16 | NimBot | Araq/Nimrod master 1c6bd59 Michał Zieliński [+0 ±1 -0]: add quoteShell to osproc.nim |
20:32:16 | NimBot | Araq/Nimrod master db0da97 Michał Zieliński [+0 ±1 -0]: Deprecate quoteIfContainsWhite in favor of osproc.quoteShell. |
20:32:16 | NimBot | Araq/Nimrod master 6895423 Michał Zieliński [+0 ±5 -0]: Use quoteShell in stdlib, where appropriate. |
20:32:16 | NimBot | Araq/Nimrod master 99a0016 Andreas Rumpf [+0 ±6 -0]: Merge pull request #737 from zielmicha/quote-shell... 2 more lines |
20:33:30 | faassen | gradha: anyway, yeah that modification makes the crash go away. |
20:34:17 | faassen | that brings me to a related question.. since I don't like typing stuff with indexes in it, I could write a proc and pass the indexed thing into it, and then operate on it there. |
20:34:29 | faassen | is there a way to do that inline? assignment doesn't work, as it's going to make a copy. |
20:34:48 | faassen | i.e. alias foo = grid[i][j] |
20:36:27 | gradha | maybe use a pointer? |
20:36:32 | faassen | I ventured into nimcache and see that gradha's indexed approach produces C code without memcpy in the failing function. |
20:36:35 | faassen | gradha: aren't those unsafe? |
20:36:43 | Araq | use a ptr or a template |
20:37:02 | faassen | is a ptr an acceptable approach here? wouldn't I be able to do all kinds of unsafe things with a ptr? |
20:37:14 | Araq | yeah it's unsafe but then you don't care, you care about your typing convenience :P |
20:37:33 | faassen | Araq: I care about safety *and* typing convenience, obviously. |
20:37:49 | Araq | use a template then and rely on the compiler's CSE |
20:38:13 | faassen | Araq: anyway, it's also plain readability.. doing a nested for loop with repeated indexes versus a nested loop over values. |
20:38:40 | faassen | I just found it interesting that you can do this kind of aliasing when you pass it into a proc. |
20:38:51 | faassen | as passing it into a proc doesn't copy... at least, that's where I get muddled. |
20:39:20 | faassen | but that I couldn't figure out a way to do it outside of the proc. I was naively using assignment and then after a long while realized that was of course doing a copy, as the manual clearly states. |
20:40:25 | Araq | var foo: var T = a[i][j] might compile though i'm not sure, lol |
20:40:41 | EXetoC | "#ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x". sometimes it's static, and sometimes it's extern. |
20:41:07 | Araq | EXetoC: pretend it's static then |
20:41:20 | faassen | Araq: heh, I'll try that, odd how it looks. |
20:41:37 | EXetoC | it'll just work in all cases then? will try |
20:42:05 | ddl_smurf | (a static is a variable declared in an object file, other files that wish to access it should declare it extern so that they don't create a separate static variable with the same name - which wouldn't link) |
20:42:47 | faassen | Araq: no such luck, invalid type. :) |
20:42:53 | Araq | good |
20:43:10 | Araq | it's just as unsafe anyway |
20:44:37 | faassen | Araq: anyway, I hope you're not annoyed by my feedback. I realize that I need to adjust my way of thinking, but Nimrod's for loop tends to tease me, as it seems it lets me do what I want, and then each time I get closed pulls it away from me again. |
20:45:23 | faassen | Araq: and what I want is writing Python-style for loops, avoiding manual indexes if I can. that's not a crazy dream for Nimrod, I hope. |
20:46:24 | Araq | faassen: so write an mitems for arrays and make a PR |
20:46:35 | Araq | for x in mitems(myarray) |
20:46:44 | Araq | is certainly not too burdensome is it? |
20:47:21 | faassen | Araq: not too burdensome, though I still stick with my previous comment that the plain for loop should be the one that allows for the modification use case. |
20:47:37 | faassen | Araq: and I don't know how to avoid doing the stack busting. :) |
20:47:58 | Araq | that would avoid the stack busting as a side effect |
20:48:57 | faassen | Araq: hm.. how come the built-in one does stack busting then? I mean, how come it doesn't avoid it? |
20:49:10 | faassen | Araq: hm.. what is the referrent of 'that'? |
20:50:02 | * | dymk quit (Ping timeout: 264 seconds) |
20:50:09 | Araq | iterator mitems[IDX, T](x: array[IDX, T]): var T = # implementation exercise for the reader |
20:50:20 | * | BitPuffin quit (Ping timeout: 260 seconds) |
20:50:33 | Araq | then use that, since it yields a 'var T' it obviously can't perform a copy and swwwooosh |
20:50:41 | Araq | stack overflow is gone too |
20:51:07 | faassen | aah, the 'var' bit makes it go away? |
20:51:12 | faassen | that's what I thought but I wasn't sure. |
20:51:36 | gradha | faassen, you can look at the tables.mvalues implementation for inspiration |
20:51:54 | faassen | gradha: thanks! |
20:52:23 | fowlmouth | i'll implement it for 0.05 btc |
20:52:29 | EXetoC | V, up, %, up, d, repeat. is there a way to empty C function bodies automatically? :> |
20:52:48 | faassen | one moment I'm writing small experiments the next moment I'm writing iterators. in fact I already wrote an indexes iterator earlier. |
21:00:41 | faassen | gradha: why in mvalues for tables is the t argument 'var'? |
21:01:12 | gradha | to avoid a copy? |
21:01:29 | gradha | how else are you going to modify the original? |
21:01:30 | faassen | ah, non-var arguments are automatically copied like in assignment? I got muddled thinking about that. |
21:01:35 | faassen | hm, but they don't get copied. |
21:02:35 | Araq | well yes they don't. but you guarantee memory safety otherwise |
21:02:43 | faassen | gradha: hm.. oh, wait, they could still get copied. |
21:02:55 | Araq | and fyi currently 'var T' as a return type is not memory safe |
21:02:59 | faassen | right.. it doesn't matter, since the argument is immutable.. |
21:03:14 | faassen | it doesn't matter if copying takes place or not, that can be left up to the compiler, right? |
21:03:19 | Araq | yes. you can't get a mutable view on something that's immutable |
21:03:38 | * | BitPuffin joined #nimrod |
21:03:45 | faassen | Araq: ah, so your suggested mitems signature needed an additional var, right? |
21:03:50 | faassen | in the input parameter? |
21:04:15 | Araq | right |
21:04:23 | * | dymk joined #nimrod |
21:04:24 | ddl_smurf | (vi{d) |
21:04:28 | Araq | sorry, my bad |
21:04:57 | faassen | Araq: so memory safety.. not memory safe, what does that mean in practice? that the array I pass in can disappear even if I keep a reference to a return value of mitems? |
21:05:43 | Araq | I guess you mean the right thing |
21:05:58 | Araq | your mitems is fine though |
21:06:13 | Araq | there are other use cases involving var T which break safety |
21:06:24 | faassen | ah, okay. |
21:06:53 | faassen | anyway, now I am getting for a 'var' type a variable needs to be passed. |
21:07:56 | faassen | https://gist.github.com/faassen/7994456 |
21:08:43 | Araq | yes well that's only consistent |
21:08:53 | * | BitPuffin quit (Ping timeout: 245 seconds) |
21:08:54 | faassen | I'm sure, but I'm still mystified. :) |
21:09:15 | Araq | you can modify 'field' |
21:09:26 | Araq | but 'field' is a view on 'world' |
21:09:32 | Araq | and world is immutable |
21:09:37 | faassen | aaah, right. |
21:09:37 | Araq | so ... there :P |
21:09:53 | faassen | so that's a drawback of making the default behavior of for be mutable. |
21:09:57 | faassen | the mutability would have to spread everywhere. |
21:10:02 | faassen | even for code that just was looking. |
21:10:04 | Araq | yup |
21:10:14 | faassen | now it works, thanks. |
21:10:36 | faassen | it takes a while to wrap my head around things, sorry. |
21:10:52 | Araq | well indeed the usual solution is at this point to give up and use a 'ref' everywhere :P |
21:15:16 | tylere | faassen: it's a bit weird. Most functional(ish) languges (eg. Scala, or Haskell) are basically refs everywhere behind the scenes |
21:16:01 | faassen | tylere: yeah, so are many interpreted OO languages like Python. |
21:16:16 | faassen | tylere: or JavaScript. |
21:16:31 | Araq | yeah, it's like Nimrod tries to fill an almost empty niche here |
21:16:39 | tylere | faassen: python is weird |
21:16:46 | Araq | with its value based data types ... :P |
21:16:49 | tylere | faassen: things like (mostly small) numbers aren't refs |
21:16:50 | faassen | anyway, I'm having problems compiling this code actually. I thought it worked but it turns out it was linking with a previous .o file |
21:16:57 | faassen | when I removed nimcache it failed. |
21:17:04 | Araq | uh oh |
21:17:04 | * | BitPuffin joined #nimrod |
21:17:05 | faassen | tylere: not for me, I've been using it since '98. :) |
21:17:18 | tylere | faassen: so have I, more or less |
21:17:20 | faassen | tylere: I'm all weird by now. actually it made sense to me back then too. |
21:17:29 | tylere | faassen: I forget the exact timing, but 1.5.2 was the new hawtness |
21:17:40 | tylere | this was on a PPC mac running OS8.5 or something like that |
21:17:47 | faassen | yeah, I came in when 1.5.2 hadn't come out yet if I recall correctl. |
21:17:48 | tylere | probably 99ish though |
21:17:57 | faassen | it was 1.5.1 possibly. |
21:18:14 | tylere | I definatly remember being weirded out by 2.0 |
21:18:17 | tylere | iterators, all that jazz |
21:18:32 | faassen | Python has a deliberately very simple implementation. makes it slow but mostly predictable. and then there's PyPy. :) |
21:18:58 | faassen | so anyway, let me post my code.. the C compiler fails on it. |
21:19:28 | faassen | https://gist.github.com/faassen/7994609 |
21:19:57 | * | BitPuffin quit (Client Quit) |
21:20:06 | faassen | the nimrod compiler output claims there's no .o file when it tries to link it. |
21:20:16 | faassen | but when I run the gcc command by hand I get compilation errors. |
21:20:25 | faassen | error: cannot convert to a pointer type |
21:20:30 | faassen | error: lvalue required as unary ‘&’ operand |
21:20:52 | Araq | let me guess |
21:20:59 | Araq | it produced && ? |
21:21:05 | faassen | is my gcc too old or something? |
21:21:11 | faassen | let me take a look.. |
21:21:17 | Araq | nah, that looks like a compiler bug to me |
21:21:27 | faassen | can't find a && in the file. |
21:21:30 | faassen | let me look at the generated code. |
21:21:58 | tylere | fails here too |
21:22:03 | tylere | running recent clang and nim |
21:22:08 | tylere | Users/teaves/test.nim(14, 2) Hint: 'PWorld' is declared but not used [XDeclaredButNotUsed] |
21:22:08 | tylere | nimcache/teaves_test.c:105:35: error: operand of type 'tfield77009' (aka 'struct tfield77009') where |
21:22:08 | tylere | arithmetic or pointer type is required |
21:22:10 | tylere | field_77137 = &((tfield77009*) (row_77092[(i_77139)- 0])); |
21:22:35 | tylere | Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) |
21:22:35 | tylere | Target: x86_64-apple-darwin12.5.0 |
21:22:38 | faassen | yeah, that is the line on which it fails for me. |
21:22:45 | Araq | make TField an object and try again |
21:22:46 | tylere | nimrod compiled for git a few days ago |
21:22:51 | faassen | gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) |
21:22:55 | Araq | yeah yeah yeah I know I know |
21:23:12 | Araq | don't spam the channel |
21:23:29 | faassen | yeah, now it works. |
21:25:07 | faassen | I'm quite excited again in having possibly found a compiler bug that's not a stack overflow this time! |
21:27:01 | Araq | congrats you found a compiler bug |
21:27:10 | faassen | yay! :) |
21:28:43 | NimBot | Araq/Nimrod master c93951e Araq [+0 ±12 -0]: implemented 'injectStmt'; more debug support |
21:28:43 | NimBot | Araq/Nimrod master 7682e33 Araq [+0 ±6 -0]: Merge branch 'master' of github.com:Araq/Nimrod |
21:28:47 | * | hoverbear quit (Quit: Hibernating, be back soon.) |
21:29:39 | * | achim quit (Quit: Computer has gone to sleep.) |
21:32:10 | OrionPKM | araq is it possible to make inject stmt scoped? |
21:32:18 | OrionPKM | I could see it being useful for unit testing cleanup/teardown |
21:33:03 | Araq | sure it's possible. will I do it? no. because it's for my debugging pleasure and not for your unit testing pleasure |
21:33:23 | OrionPKM | :P |
21:33:43 | OrionPKM | as if I would derive pleasure from writing unit tests |
21:34:51 | Araq | a more polite answer: scope based statement injection is easy to do with a macro |
21:35:13 | Araq | injectStmt is for the cases where a macro doesn't work easily |
21:35:45 | OrionPKM | ugh |
21:35:46 | OrionPKM | what was that |
21:35:48 | OrionPKM | don't do that anymore |
21:36:50 | gradha | yaman, go write that macro and PR it to the tutorial |
21:38:10 | OrionPKM | what macro |
21:40:51 | Araq | do what again? being polite? |
21:40:53 | gradha | a scope based injectStmt |
21:42:52 | * | tylere quit (Remote host closed the connection) |
21:43:25 | OrionPKM | being polite doesnt suit you |
21:43:33 | OrionPKM | I come here to be belittled and made to feel incompetant |
21:46:07 | EXetoC | me too |
21:46:21 | gradha | I come here to read about weekly articles being posted to reddit |
21:47:31 | * | faassen is starting to wonder why he comes here. :) |
21:48:00 | * | Araq is here to help people, believe it or not |
21:48:20 | faassen | Araq: I believe you. there are cultural aspects to this, I think, too. |
21:48:40 | faassen | Araq: I'm Dutch. we got a reputation for bluntness. :) |
21:48:55 | faassen | and when you talk to Guido van Rossum, well.. it fits. |
21:52:02 | Araq | never talked to him, talked to Larry Wall once |
21:52:17 | Araq | he's as crazy as you'd think :P |
21:52:38 | faassen | I saw him talk once or twice, but it was about a decade ago. |
21:52:42 | faassen | never talked to him. |
21:52:48 | faassen | I've had flaming arguments with Guido. :) |
21:53:18 | faassen | Guido's definitely not crazy. he's just very direct. not all of it is because he's Dutch, but that's our culture. |
21:53:33 | Araq | flaming arguments about what? |
21:54:16 | faassen | I suggested back in 2007 that I wasn't that excited about backwards compatibility breaking Python 3. |
21:54:31 | faassen | because I had a lot of code. |
21:55:07 | faassen | that was before it was released. so I was saying critical things, and that didn't quite fit the message people were trying to put out about it. |
21:55:18 | * | DAddYE joined #nimrod |
21:55:23 | * | DAddYE__ quit (Read error: Connection reset by peer) |
21:55:53 | faassen | I was worried the language community would split into two as code is hard to move. turns out people figured a way to write code that runs in both languages (a strategy that wasn't really considered possible by the language devs at the time, so rejected) |
21:55:56 | * | DAddYE_ joined #nimrod |
21:56:05 | faassen | but that code looks pretty ugly, so puts the maintenance burden to the library developers. |
21:56:33 | faassen | so about that time I went to a python conference and met Guido in the airport. :) |
21:58:46 | faassen | and he read my blog posts about it and he was not pleased. |
21:59:05 | gradha | faassen: give us your blog address |
21:59:15 | brihat | ^ |
21:59:18 | faassen | http://blog.startifact.com/posts/older/brief-python-3000-thoughts.html |
21:59:24 | faassen | and followups. |
21:59:33 | * | DAddYE quit (Ping timeout: 248 seconds) |
21:59:56 | faassen | I stopped blogging about Python 3 after that. :) |
22:01:00 | gradha | my biggest complaint to Guido would be why break compatibility when there's little improvement in the language, I still can't see anything "wow" in 3, only different ways to do stuff |
22:01:11 | faassen | anyway, we're 5 years into the transition now.. Python 3 interpreter is mature enough now, libraries are steadily being ported (with resulting ugly code inside, unfortunately), new code is being written. but of course many apps will be stuck in python 2 land for the foreseeable future, and there's still way more Python 2 code being maintained and probably actively developed than 3. |
22:01:27 | gradha | but then, I stopped caring about Python long ago, so I wouldn't argue much |
22:01:30 | faassen | gradha: yeah.. well, that's Python 3's strength and weakness at the same time. |
22:01:53 | faassen | gradha: python 3 avoids the total rewrite phenomenon so it actually *exists*, unlike, say, Perl 6 which had a much harder road. |
22:02:18 | faassen | gradha: but it also then lacks compelling reasons to port, and there's a huge compelling reason not to port, i.e. libraries that haven't been ported yet. |
22:02:40 | Trixar_za | That and most of us are too lazy |
22:02:49 | faassen | Trixar_za: yeah. and it costs money, if you're in business. |
22:02:56 | gradha | faassen: you should blog about how nimrod sucks because tuples and arrays are broken, drama brings in more people than correct posts |
22:03:22 | Trixar_za | Hey, I'll get on that bandwagon |
22:03:23 | Trixar_za | :P |
22:03:33 | faassen | gradha: yeah, I noticed, but I try to be nice. :) |
22:04:07 | faassen | gradha: oh, you mean more people for *Nimrod*? yeah, good marketing. |
22:04:09 | gradha | being nice alienates OrionPKM, so don't do it |
22:04:16 | Trixar_za | Oh hey, faassen, did you see that they've restarted irclib again - now they call it irc though |
22:04:21 | faassen | gradha: oh, sorry OrionPKM, I mean, totally NOT sorry! |
22:04:29 | Trixar_za | It's also ported to Python 3 |
22:04:39 | OrionPKM | preciated |
22:04:42 | faassen | Trixar_za: I have no idea what irclib even is. :) |
22:04:59 | faassen | Trixar_za: oh, a Python library? |
22:05:01 | Trixar_za | The python library for writing IRC related content |
22:05:35 | faassen | anyway, I am just enjoying the whole "frontier" feel of Nimrod, so it doesn't suck for me. :) |
22:05:47 | Trixar_za | Was the defecto standard for a while with many people trying to write something better. It had the limit of only being useful for single server ircbots |
22:05:56 | faassen | at least it gives me broken stuff early and often. :) |
22:06:22 | Trixar_za | I should probably rewrite some of my python scripts in it. They keep breaking and I'm too lazy to port to nimrod :P |
22:06:24 | faassen | Trixar_za: there are so many Python libraries, I can't keep track of what's going on. I like 'defecto standard' :) |
22:07:40 | brihat | nice blog post faassen |
22:08:37 | faassen | brihat: thanks, I wrote it looong ago. :) |
22:09:31 | * | Araq read it a long time ago |
22:11:18 | faassen | Araq: oh, neat! Guido did tell me I should realize more people read my blog than I perhaps thought, which explains part of his reaction. |
22:11:42 | * | Araq fell into the Magic Internet when he was a little boy |
22:11:58 | faassen | Araq: me too! |
22:12:38 | shodan45 | the internet was around when you were little? |
22:12:54 | faassen | Araq: I'm tickled you actually remember reading it. do you remember what you thought at the time? (I shall create a new language that is incompatible with everything!) |
22:13:39 | Araq | what I thought? dunno, most likely "yeah good rant" because I love rants |
22:14:17 | faassen | hehe. |
22:14:30 | Trixar_za | It's a pretty good argument if you ask me |
22:14:35 | faassen | shodan45: who are you asking, me or Araq? |
22:15:05 | Araq | shodan45: I'm not as old as you think |
22:15:12 | Araq | ... perhaps |
22:15:24 | brihat | now Araq will terll us his age |
22:15:38 | Trixar_za | or lie about it like a woman |
22:16:07 | Araq | or be quiet like I always do when it comes to personal things |
22:16:29 | shodan45 | faassen: was rhetorical :P |
22:17:49 | faassen | shodan45: hey, well, but who are you asking rhetorically? :) |
22:18:39 | Trixar_za | What does the V in VNUG stand for? Voice? Nimrod User Group |
22:18:58 | gradha | V for Varriount |
22:19:12 | Trixar_za | Oh and I figure that Araq is atleast in his late 20s if he remembers System Shock |
22:20:48 | Araq | muhaha but this is also from system shock 2, so I could be younger :P |
22:23:48 | * | eigenlicht quit (Ping timeout: 246 seconds) |
22:28:09 | OrionPKM | I bet araq is a teenage prodigy |
22:28:12 | OrionPKM | he's actually 15 |
22:28:19 | Trixar_za | Yeah right Araq |
22:28:27 | Trixar_za | System Shock 2 came out in 1999 |
22:28:33 | OrionPKM | I'm a young guy, but you guys make me feel old |
22:29:03 | * | eigenlicht joined #nimrod |
22:32:30 | * | zielmicha quit (Ping timeout: 252 seconds) |
22:33:20 | brihat | Araq's profile: http://osrc.dfm.io/araq |
22:33:52 | brihat | Just 17%? I thought he wrote > 50% of Nimrod code out there |
22:33:53 | OrionPKM | lol |
22:34:19 | OrionPKM | Dominik is more of a Java aficionado |
22:34:20 | OrionPKM | bwahahaha |
22:41:14 | Trixar_za | It's not really all that accurate |
22:41:24 | Trixar_za | http://osrc.dfm.io/trixarian |
22:41:28 | Trixar_za | I barely know perl |
22:42:13 | faassen | it claims I do most of my commits in the early morning. certainly not. :) |
22:43:45 | brihat | According to the pic here: https://thestrangeloop.com/sessions/nimrod-a-new-approach-to-meta-programming |
22:43:58 | brihat | Araq definitely doesn't look like 15! |
22:45:04 | OrionPKM | german 15 is not like the rest of the world's 15 |
22:46:40 | Trixar_za | Yet you can still go to jail for it |
22:47:20 | Trixar_za | But I've met a few 19 year old programmers (and younger) that blow me out of the water, so what do I know? :P |
22:47:24 | brihat | Araq, are there slides or videos of your talk at this Strange Loop presentation? |
22:48:00 | gradha | http://nimrod-lang.org/talk01/slides.html |
22:48:03 | Araq | the slides are on our website and I still have no idea when the vid will be released |
22:48:10 | dom96 | i'm a Java what now? |
22:48:14 | Araq | good night |
22:48:37 | brihat | Oh, is that the same one |
22:49:11 | OrionPKM | dom96 you're a java expert, gj |
22:51:03 | dom96 | That's not really an achievement. A well trained monkey could easily be a Java expert. |
22:51:25 | brihat | my manager calls them java monkeys |
22:54:19 | brihat | why wasn't 0.9.4 released today? Araq had promised |
22:54:51 | fowlmouth | lol |
22:54:55 | * | radsoc quit (Ping timeout: 245 seconds) |
22:55:03 | fowlmouth | i think there is a lot to do for 0.9.4 |
22:55:15 | gradha | Araq didn't commit to a specific year |
22:55:20 | Araq | well ... plans never work out |
22:55:52 | Araq | you plan so that you notice when you're off |
22:55:56 | fowlmouth | 0.9.2.2 maybe |
22:56:14 | fowlmouth | gn all |
22:56:33 | brihat | me dumb, didn't get that joke yesterday |
22:56:51 | Araq | I still think we might make a release this year |
22:57:13 | Araq | but tbh bug fixing is happening way too slow |
22:58:38 | brihat | no probs, i'm always up to git master branch.. so it's ok |
23:10:35 | brihat | whoa, Nimrod is being taught in universities already. |
23:10:38 | brihat | http://www-usr.inf.ufsm.br/~vinileal/elc117/t1/ |
23:11:05 | brihat | Looks Brazilian, "Programming paradigms" |
23:11:18 | * | DAddYE_ quit (Read error: Connection reset by peer) |
23:11:37 | * | DAddYE joined #nimrod |
23:12:42 | EXetoC | woot |
23:13:14 | * | faassen waves good night. :) |
23:13:21 | faassen | t'was fun, thanks! |
23:13:27 | Trixar_za | Night faassen |
23:13:31 | brihat | by faassen |
23:13:44 | Araq | good night |
23:13:45 | * | faassen left #nimrod (#nimrod) |
23:13:47 | Araq | (again) |
23:13:58 | Trixar_za | Goodnite Araq |
23:15:37 | chat1 | is there anyway to have nimrod output the possibilities when it encounters a ambiguous type? |
23:16:06 | gradha | chat1: it usually tells you what it got and what types it expected |
23:19:21 | chat1 | gradha: well, i get the error: "Error: expression 'put_cell(cuint(x), cuint(y), cell)' has no type (or is ambiguous)" which I intepret as cell having the ambigouos type, but I can't figure out what to do about it. |
23:20:29 | chat1 | ah... no, that's just my misstake... i actually call the cuint type casts on x and y |
23:21:35 | gradha | I understand the result of put_cell() has no type, so maybe it's a void proc and you are trying to assign it to something? |
23:23:37 | brihat | chat1: it's the irc syndrome. You'll find answer to your own question just after you post it to irc |
23:26:40 | chat1 | brihat: ah, no, that was just my assumption that was wrong... the error persists |
23:26:58 | chat1 | Here is a longer description: https://gist.github.com/KoFish/7996768 |
23:27:12 | * | darkf joined #nimrod |
23:29:53 | * | DAddYE_ joined #nimrod |
23:31:21 | * | DAddYE__ joined #nimrod |
23:31:30 | * | DAddYE quit (Read error: Connection reset by peer) |
23:32:48 | brihat | bye bye |
23:32:52 | gradha | chat1: that example is not correct nor self contained, so it's difficult to reason about |
23:33:01 | gradha | chat1: I made some tweaks to get https://gist.github.com/gradha/7996913 |
23:33:44 | gradha | you can see on that version that the problem is trying to pass a variable where a ptr is expected |
23:35:17 | * | DAddYE_ quit (Ping timeout: 250 seconds) |
23:35:21 | gradha | if you start from there and try to pass a cell.addr then I get a similar error to yours (the one about no type) |
23:35:51 | gradha | this happens because you can't call addr on parameters or let variables |
23:36:43 | chat1 | gradha: ah, hang on, fixing the example |
23:37:26 | chat1 | https://gist.github.com/KoFish/7996768 |
23:37:48 | chat1 | thanks for the help |
23:38:51 | gradha | chat1: if you change the last colon to an equal sign it works |
23:39:08 | gradha | "proc put*(cell: var tb_cell; x, y: int) =" |
23:39:11 | * | DAddYE__ quit (Read error: Connection reset by peer) |
23:39:22 | chat1 | oh.. ffs >_< |
23:39:27 | chat1 | thanks! |
23:39:32 | gradha | the colon tells nimrod the proc returns a value, and expects a type |
23:39:38 | * | DAddYE joined #nimrod |
23:40:29 | chat1 | yep |
23:40:42 | chat1 | now i feel even more stupid :P |
23:41:48 | gradha | don't worry, in the beginning it happens a lot to change : with = and viceversa |
23:43:31 | chat1 | yeah, well, now I know what that error means :P |
23:44:19 | gradha | in the beginning the erros don't tell much, but it's also sometimes hard to guess the intention of the programmer |
23:48:13 | gradha | good night, honey badgers |
23:48:28 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again) |
23:49:03 | * | DAddYE_ joined #nimrod |
23:51:00 | * | DAddYE__ joined #nimrod |
23:51:55 | * | DAddYE quit (Read error: Connection reset by peer) |
23:54:24 | * | DAddYE_ quit (Ping timeout: 246 seconds) |