<< 16-12-2013 >>

00:02:21*musicalchair quit (Ping timeout: 245 seconds)
00:03:39*musicalchair joined #nimrod
00:03:59EXetoCAraq: how do I make it work in this case? "typedef struct FT_FaceRec_* FT_Face;"
00:04:54EXetoCall the fields are publically available, and I've validated this in C
00:05:18EXetoCtypedef struct FT_FaceRec_{...} FT_FaceRec;
00:09:28Araqtype FT_FaceRecObj = object; FT_FaceRec = ptr FT_FaceRecObj
00:15:16EXetoCAraq: I mean by only using the header and importc pragmas
00:16:59Araqwell yes that should work, no idea what you're asking
00:26:20EXetoCAraq: 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:26Araqwell try it on the field: field {.importc: "namehere".}: cint
00:28:41EXetoCI remember seeing that
00:31:52EXetoCAraq: but then it uses '.' instead of '->'. how do I deal with that?
00:34:46Araqwell you need to tell nimrod it's a ptr type to some struct/object
00:34:55EXetoCit compiles now. I specified the actual name rather than the typedef'ed name
00:35:13psquidHeh, 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:14psquidno longer need to run it every time if the output never changes.
00:37:05psquidSo nimrod being capable of that is definitely something I approve of. :P
00:37:51EXetoCAraq: no, I had to modify the importc argument
00:39:19AraqEXetoC: well I can't follow sorry. make a proper bug report if you want this thing sorted out.
00:44:51EXetoCAraq: 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:29Araqwell make a bug report and I'll tell you
00:47:44EXetoCok
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:39BitPuffinnight!
02:31:17*fowl joined #nimrod
02:33:09*BitPuffin quit (Ping timeout: 248 seconds)
02:34:33EXetoCwhat purpose does importc on fields serve? the ability to omit the type?
02:34:54*hoverbear joined #nimrod
02:35:11hoverbearCan you do OpenCL code in Nimrod?
02:36:07fowlEXetoC, importc on fields is only needed if you are using a diff name than it uses in c
02:45:04EXetoCfowl: ok but what does it actually do? make sure that it exists?
02:49:18fowlhuh
02:51:29EXetoCfowl: importc on types and fields
02:52:12fowlwhat are you saying
02:52:20fowlmake sure it exists? what are you talking about
02:54:02EXetoCwhy use it on anything other than proc's?
02:54:51fowlso that you can access c types/structs/fields/etc
02:55:54EXetoCwhat'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:04EXetoCis this related to exporting?
02:57:09EXetoCto C
02:57:54fowlyou would be importing the header, all the functions and types in the c api, then not using the right types
02:58:30fowlplus the compiler might bitch about you passing tfoo* instead of struct foo* to its functions
02:58:38fowlthe compiler as in gcc
03:04:06EXetoCfowl: so it saves me from importing proc's explicitly? I don't know how else that problem may arise
03:05:27fowlwhat problem?
03:08:01EXetoCfowl: tfoo* vs struct foo*
03:15:15fowlem
03:15:27fowlit will arise by
03:15:33fowlok its like this
03:15:56*shodan45 joined #nimrod
03:15:59fowlint foo(struct bar *obj); right
03:16:33fowlnvm
03:16:44fowli dont think i can explain this right
03:17:03fowlare 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:04EXetoCfowl: yes, but isn't it only relevant when emitting C code? which is what I was thinking of doing
03:21:42shodan45if I want to generate JSON, should I just manually build up a string, or is there a library that would be better?
03:21:55fowlshodan45, json module in stdlib
03:22:17fowlEXetoC, i dunno what you're asking me, i'll take a look if you want me to
03:23:08shodan45fowl: yeah, I saw that, but it looks like it's mostly (only?) a parser
03:23:50fowlno you can use it to build too
03:24:01fowlsee `%` operator and pretty()
03:24:10shodan45fowl: hmm, ok
03:27:29fowllol! http://thechangelog.com/raphters-a-web-framework-for-c/
03:29:56EXetoCfowl: 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:03EXetoCotherwise you just do it the c2nim way
03:31:12fowlno dude its to use them from nimrod
03:31:55EXetoCok nevermind
03:37:48EXetoCI've never had to care about that, so I don't have a clue
03:38:12EXetoCmight as well not care then :p
03:40:36fowldamnit 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:00shodan45lol.... when playing around with a module, don't save your testing code with the same name as the module you're using :)
06:42:49shodan45took 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:12Araq'importc' for fields only affects name mangling, nothing more, nothing less
11:59:49Araqname mangling for field names is only important if your wrapper uses .header
12:00:20Araqit's all pretty simple, I guess we need to improve the docs, as usual
12:02:20Araqbye
12:02:26HipsterPuffinAraq: Yep, documentation is king
12:16:57EXetoCok 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:45EXetoCAraq: isn't the header pragma discouraged?
14:10:36EXetoCdo 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:26HipsterPuffinthats violent
14:21:28*HipsterPuffin left #nimrod (#nimrod)
14:21:50*Arcanum_za joined #nimrod
14:22:34EXetoCfowl: :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:12AraqEXetoC: indeed I had a program to do that, let me see if it still exists
15:00:18Araqit's in tools/cmerge.nim
15:00:35*BitPuffi1 joined #nimrod
15:03:34psquidSo 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:57psquidSpecifically, this program: http://pastebin.ca/2508316 fails with this output: http://pastebin.ca/2508317
15:04:43OrionPKMget rid of the word 'static' maybe
15:05:08OrionPKMuse staticRead (i think thats what its called)
15:05:59psquidNo 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:25OrionPKMI think the static keyword opens a block
15:06:48OrionPKMhttp://nimrod-lang.org/manual.html#static_1979384223
15:08:16psquidIt 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:48psquidAnd yeah, looks like it *is* staticRead. Cheers. :)
15:10:05psquidI'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:161JTABG83TAhah
15:29:161JTABG83TNow I am a true hipster
15:29:161JTABG83Tgot a macbook through work
15:29:16*1JTABG83T quit (Client Quit)
15:30:32OrionPKMcool?
15:30:51BitPuffinOrionPKM: sure
15:31:17BitPuffinOrionPKM: A bit of heresy, I kind of enjoy it so far
15:31:27BitPuffinalthough it can't beat my tiling wm ;)
15:36:40psquidOoh, what do you use for tiling?
15:37:06BitPuffinpsquid: on linux?
15:37:46psquidI 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:51psquidBitPuffin: 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:03BitPuffinpsquid: I use i3 on linux
15:43:21BitPuffinpsquid: it is the best out of the ones I have tried :)
15:43:29BitPuffin(awesome, xmonad)
15:44:17psquidI 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:02psquidThough I do have i3lock as my locker, since slock is a little *too* bare for my tastes. xD
15:45:20psquidAnd that's pretty nice, so I'll have to give the full WM a try.
15:46:18*PortableEXetoC joined #nimrod
15:46:27BitPuffinpsquid: it's awesome
15:46:44BitPuffinpsquid: check out the screencast and you will see immediately why I like it so much haha
15:46:59psquidBut I thought awesome that was that other WM?
15:47:01psquid:P
15:47:12psquids/that was/was/
15:47:33psquidAnd ooh, screencast.
15:48:27BitPuffinpsquid: herp herp :P
15:49:24psquidOh 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:05BitPuffinofc nimrod is already set up on my macbook lol :D
15:51:11BitPuffinjust gotta get babel installed
15:51:59*ddl_smurf joined #nimrod
15:52:01psquidOoh, 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:31psquidBitPuffin: Ooooh, I *like* the stacking layout. I think that may be what hooks me once i3's emerged and running. xD
15:55:56fowlmouthbah
15:56:03fowlmouthfowl, 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:51BitPuffindom96: wanna play some dota2 later? :P
16:50:05dom96I doubt i'll have enough time so I'll say maybe.
16:53:58BitPuffindom96: I don't really have either, but I wanna give it a shot lol
16:56:39fowlmouthsomeone play starbound with me
16:56:52dom96Starbound has multiplayer?
16:56:56fowlmouthyea
16:57:06dom96Buy me it and I just might play it :P
16:57:19fowlmouthlinux torrents up at the piratebay
16:57:44dom96but that's illegal :O
16:57:46fowlmouthmake sure you get patches 3-6
16:58:02fowlmouthwhat? i dont know what youre talking about
16:58:03fowlmouthwink
16:59:16BitPuffinfowlmouth: newb
16:59:21*dymk joined #nimrod
16:59:27*brson joined #nimrod
17:00:00fowlmouthyou are newb
17:01:19*gradha joined #nimrod
17:06:02gradhapsquid: 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:23gradhapsquid: so staticRead and staticExe (aka slurp/gorge) are shortcuts to avoid that restriction and be useful, but there's no staticWrite
17:06:46gradhapsquid: however, these procs are obsoleted by the FFI support
17:07:04gradhapsquid: when you compile with FFI you can use any C function at compile time
17:07:18psquidgradha: Aha, gotcha. :o
17:07:59gradhapsquid: to have FFI you need to build koch with -d:useFFI IIRC
17:08:17gradharather, you need to boot koch with -d:useFFI, as stated in the command line help
17:09:26gradhawell, 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:57OrionPKMdidnt realize nimrod had to be built differently for useFFI
17:14:01Araqgradha: useFFI uses an abbrev is therefore bad. your statistics lie, it's bad code.
17:14:22EXetoCAraq: I thought you were crazy enough to duplicate some of the effort for every header. this should make the porting bearable
17:14:42OrionPKMyep
17:15:05gradhaAraq: my statistics lie?
17:15:11OrionPKMdistnct
17:15:50EXetoCsometimes 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:40Araqhi dimetrio welcome
17:26:12*phonedisplay quit (Remote host closed the connection)
17:26:12*dimetrio quit (Remote host closed the connection)
17:26:17EXetoC:/
17:30:01*Mordecai joined #nimrod
17:30:25*psquid quit (Ping timeout: 245 seconds)
17:32:06Araqhi Mordecai welcome
17:33:17*Mordecai is now known as psquid
17:33:34psquidI 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:38EXetoCpsquid: you don't like the feature, or the fact that it happens?
18:00:03*isenmann joined #nimrod
18:00:37psquidThat 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:49zielmichaHow do I convert cstring to string?
18:09:01gradhazielmicha: $variable
18:09:28zielmichasurprsing, I must say
18:09:53dom96The answer to "How do I convert * to string?" is always ``$`` :P
18:09:59dom96well, usually.
18:10:12gradhayeah, when you have a proc to convert ints to strings, it's shocking the same works for other types too
18:11:48zielmichaDoes it copy cstring?
18:12:59Araqyes
18:13:15gradhazielmicha: I think it would break pretty badly if not, because a cstring is not traced IIRC, it could come from… gasp… C
18:17:05gradhado 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:05gradhaor 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:26Araqwell it reflects the order in the AST
18:19:41Araqso it's as good as it gets imo
18:20:16Araqwe need a better AST api but fixing individual procs won't get us there, I think
18:21:29OrionPKMthe API to work with the AST is a bit unruly, but dammit if it isnt powerful
18:21:39OrionPKMI'm going to be abusing the shit out of macros now :P
18:22:57OrionPKMI 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:25OrionPKMlike the term rewriting macros page, but for general compile time code generation
18:23:36OrionPKMcommon examples
18:23:52*DAddYE joined #nimrod
18:24:01gradhabut people don't read docs
18:24:09OrionPKMpeople love examples though
18:24:12*shodan45_ quit (Quit: Konversation terminated!)
18:24:15OrionPKMcode samples > all
18:24:16fowlmouthgradha, example use of ident defs with a type but without a value: object fields, tuple fields, parameters, var declarations
18:24:29OrionPKMfowl's code examples helped me way more than the macros.nim doc
18:24:30tylerea "nimrod cookbook" would be immensally useful
18:24:38tyleremroe useful than api doc, even, imo
18:25:04fowlmouthtylere, most modules have an example at the bottom, in a when isMainModule: block
18:25:24tylereahh
18:25:25OrionPKMdumptree and treeRepr are very helpful for figuring out the AST as well
18:25:59tylerea lisp macro macro would be funny. E.g. a macro that let you right nimrod expressions as sexps
18:27:13gradhatylere: 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:31OrionPKMIm doing something like that for my templating module
18:27:42tylerethe nice thing about sexps is they are basically a DSL for AST
18:27:43gradhawhy use parsing at all, use nested arrays
18:27:58*levkray joined #nimrod
18:28:01OrionPKMhmm?
18:28:10tylereI don't like actually coding in them, but could be handy for e.g. code generators
18:28:30Araqhi 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:02OrionPKMhttps://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:01gradhaso 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:46OrionPKMis such a thing even possible
20:00:39faassenso anyone look at my bug yet? https://github.com/Araq/Nimrod/issues/748
20:00:43faassenI'm curious what may be going on.
20:00:56faassenand oddly pleased I found what seems to be a compiler bug. :)
20:01:53*DAddYE_ joined #nimrod
20:01:59gradhaOrionPKM: why not?
20:03:25Araqfaassen: could be an ordinary stack overflow
20:03:40OrionPKMhttp://i.imgur.com/bwU4r.gif
20:04:50fowlmouthgradha, 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:03gradhaI don't know why you would generate a macro from a macro, but a nnkMacroDef is there
20:08:03faassenAraq: I tried it with world on the heap too.
20:08:26*DAddYE_ quit (Ping timeout: 252 seconds)
20:09:38faassenAraq: 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:53Araqfaassen: the problem is likely iterators still suck for arrays and so make a copy on the stack
20:10:14faassenAraq: ah, yeah, that would do it. I didn't figure a copy was made.
20:10:14Araqdoesn't matter if you allocate the primary world on the heap or not
20:10:32faassenAraq: ah, well, I hadn't considered that. I had considered stack overflows.
20:11:05faassenAraq: though it is odd that if you take TWorld out of it, and write the display for TGrid, things do work.
20:11:23faassenAraq: 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:23faassenAraq: 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:47faassenAraq: unless the function call itself causes that much stack space to be reserved?
20:13:11Araqthat's usually the case, yes
20:13:18Araqthe function call allocates a stack frame
20:13:39Araqthe stack frame has space for any temporary arrays that you use
20:13:59Araqunless it fails of course
20:21:32faassenAraq: I'm not used to thinking about sufficiently advanced compilers. :)
20:22:12Araqwell it keeps surprising me how bad modern C compiler still are
20:22:26Araqit's so easy to do better :P
20:23:39faassenwhat would the solution to this kind of issue be? it's kind of surprising to the naive developer.
20:24:37faassenwhere I'm the naive developer. :)
20:26:04zielmichahey
20:26:05zielmichaI have a PR to merge (https://github.com/Araq/Nimrod/pull/737, "quoteIfContainsWhite -> quoteShell")
20:26:45zielmichathis time it's backward compatible
20:28:00gradhafaassen: 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:50Araqfaassen: well the proper solution is that the compiler should optimize properly
20:30:16faassengradha: 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:05faassenAraq: yeah, I really want to just to be able to loop through values instead of indexes without worry.
20:31:51faassenAraq: 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:16NimBotAraq/Nimrod master 1c6bd59 Michał Zieliński [+0 ±1 -0]: add quoteShell to osproc.nim
20:32:16NimBotAraq/Nimrod master db0da97 Michał Zieliński [+0 ±1 -0]: Deprecate quoteIfContainsWhite in favor of osproc.quoteShell.
20:32:16NimBotAraq/Nimrod master 6895423 Michał Zieliński [+0 ±5 -0]: Use quoteShell in stdlib, where appropriate.
20:32:16NimBotAraq/Nimrod master 99a0016 Andreas Rumpf [+0 ±6 -0]: Merge pull request #737 from zielmicha/quote-shell... 2 more lines
20:33:30faassengradha: anyway, yeah that modification makes the crash go away.
20:34:17faassenthat 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:29faassenis there a way to do that inline? assignment doesn't work, as it's going to make a copy.
20:34:48faasseni.e. alias foo = grid[i][j]
20:36:27gradhamaybe use a pointer?
20:36:32faassenI ventured into nimcache and see that gradha's indexed approach produces C code without memcpy in the failing function.
20:36:35faassengradha: aren't those unsafe?
20:36:43Araquse a ptr or a template
20:37:02faassenis a ptr an acceptable approach here? wouldn't I be able to do all kinds of unsafe things with a ptr?
20:37:14Araqyeah it's unsafe but then you don't care, you care about your typing convenience :P
20:37:33faassenAraq: I care about safety *and* typing convenience, obviously.
20:37:49Araquse a template then and rely on the compiler's CSE
20:38:13faassenAraq: anyway, it's also plain readability.. doing a nested for loop with repeated indexes versus a nested loop over values.
20:38:40faassenI just found it interesting that you can do this kind of aliasing when you pass it into a proc.
20:38:51faassenas passing it into a proc doesn't copy... at least, that's where I get muddled.
20:39:20faassenbut 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:25Araqvar foo: var T = a[i][j] might compile though i'm not sure, lol
20:40:41EXetoC"#ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x". sometimes it's static, and sometimes it's extern.
20:41:07AraqEXetoC: pretend it's static then
20:41:20faassenAraq: heh, I'll try that, odd how it looks.
20:41:37EXetoCit'll just work in all cases then? will try
20:42:05ddl_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:47faassenAraq: no such luck, invalid type. :)
20:42:53Araqgood
20:43:10Araqit's just as unsafe anyway
20:44:37faassenAraq: 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:23faassenAraq: 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:24Araqfaassen: so write an mitems for arrays and make a PR
20:46:35Araqfor x in mitems(myarray)
20:46:44Araqis certainly not too burdensome is it?
20:47:21faassenAraq: 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:37faassenAraq: and I don't know how to avoid doing the stack busting. :)
20:47:58Araqthat would avoid the stack busting as a side effect
20:48:57faassenAraq: hm.. how come the built-in one does stack busting then? I mean, how come it doesn't avoid it?
20:49:10faassenAraq: hm.. what is the referrent of 'that'?
20:50:02*dymk quit (Ping timeout: 264 seconds)
20:50:09Araqiterator 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:33Araqthen use that, since it yields a 'var T' it obviously can't perform a copy and swwwooosh
20:50:41Araqstack overflow is gone too
20:51:07faassenaah, the 'var' bit makes it go away?
20:51:12faassenthat's what I thought but I wasn't sure.
20:51:36gradhafaassen, you can look at the tables.mvalues implementation for inspiration
20:51:54faassengradha: thanks!
20:52:23fowlmouthi'll implement it for 0.05 btc
20:52:29EXetoCV, up, %, up, d, repeat. is there a way to empty C function bodies automatically? :>
20:52:48faassenone moment I'm writing small experiments the next moment I'm writing iterators. in fact I already wrote an indexes iterator earlier.
21:00:41faassengradha: why in mvalues for tables is the t argument 'var'?
21:01:12gradhato avoid a copy?
21:01:29gradhahow else are you going to modify the original?
21:01:30faassenah, non-var arguments are automatically copied like in assignment? I got muddled thinking about that.
21:01:35faassenhm, but they don't get copied.
21:02:35Araqwell yes they don't. but you guarantee memory safety otherwise
21:02:43faassengradha: hm.. oh, wait, they could still get copied.
21:02:55Araqand fyi currently 'var T' as a return type is not memory safe
21:02:59faassenright.. it doesn't matter, since the argument is immutable..
21:03:14faassenit doesn't matter if copying takes place or not, that can be left up to the compiler, right?
21:03:19Araqyes. you can't get a mutable view on something that's immutable
21:03:38*BitPuffin joined #nimrod
21:03:45faassenAraq: ah, so your suggested mitems signature needed an additional var, right?
21:03:50faassenin the input parameter?
21:04:15Araqright
21:04:23*dymk joined #nimrod
21:04:24ddl_smurf(vi{d)
21:04:28Araqsorry, my bad
21:04:57faassenAraq: 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:43AraqI guess you mean the right thing
21:05:58Araqyour mitems is fine though
21:06:13Araqthere are other use cases involving var T which break safety
21:06:24faassenah, okay.
21:06:53faassenanyway, now I am getting for a 'var' type a variable needs to be passed.
21:07:56faassenhttps://gist.github.com/faassen/7994456
21:08:43Araqyes well that's only consistent
21:08:53*BitPuffin quit (Ping timeout: 245 seconds)
21:08:54faassenI'm sure, but I'm still mystified. :)
21:09:15Araqyou can modify 'field'
21:09:26Araqbut 'field' is a view on 'world'
21:09:32Araqand world is immutable
21:09:37faassenaaah, right.
21:09:37Araqso ... there :P
21:09:53faassenso that's a drawback of making the default behavior of for be mutable.
21:09:57faassenthe mutability would have to spread everywhere.
21:10:02faasseneven for code that just was looking.
21:10:04Araqyup
21:10:14faassennow it works, thanks.
21:10:36faassenit takes a while to wrap my head around things, sorry.
21:10:52Araqwell indeed the usual solution is at this point to give up and use a 'ref' everywhere :P
21:15:16tylerefaassen: it's a bit weird. Most functional(ish) languges (eg. Scala, or Haskell) are basically refs everywhere behind the scenes
21:16:01faassentylere: yeah, so are many interpreted OO languages like Python.
21:16:16faassentylere: or JavaScript.
21:16:31Araqyeah, it's like Nimrod tries to fill an almost empty niche here
21:16:39tylerefaassen: python is weird
21:16:46Araqwith its value based data types ... :P
21:16:49tylerefaassen: things like (mostly small) numbers aren't refs
21:16:50faassenanyway, 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:57faassenwhen I removed nimcache it failed.
21:17:04Araquh oh
21:17:04*BitPuffin joined #nimrod
21:17:05faassentylere: not for me, I've been using it since '98. :)
21:17:18tylerefaassen: so have I, more or less
21:17:20faassentylere: I'm all weird by now. actually it made sense to me back then too.
21:17:29tylerefaassen: I forget the exact timing, but 1.5.2 was the new hawtness
21:17:40tylerethis was on a PPC mac running OS8.5 or something like that
21:17:47faassenyeah, I came in when 1.5.2 hadn't come out yet if I recall correctl.
21:17:48tylereprobably 99ish though
21:17:57faassenit was 1.5.1 possibly.
21:18:14tylereI definatly remember being weirded out by 2.0
21:18:17tylereiterators, all that jazz
21:18:32faassenPython has a deliberately very simple implementation. makes it slow but mostly predictable. and then there's PyPy. :)
21:18:58faassenso anyway, let me post my code.. the C compiler fails on it.
21:19:28faassenhttps://gist.github.com/faassen/7994609
21:19:57*BitPuffin quit (Client Quit)
21:20:06faassenthe nimrod compiler output claims there's no .o file when it tries to link it.
21:20:16faassenbut when I run the gcc command by hand I get compilation errors.
21:20:25faassenerror: cannot convert to a pointer type
21:20:30faassenerror: lvalue required as unary ‘&’ operand
21:20:52Araqlet me guess
21:20:59Araqit produced && ?
21:21:05faassenis my gcc too old or something?
21:21:11faassenlet me take a look..
21:21:17Araqnah, that looks like a compiler bug to me
21:21:27faassencan't find a && in the file.
21:21:30faassenlet me look at the generated code.
21:21:58tylerefails here too
21:22:03tylererunning recent clang and nim
21:22:08tylereUsers/teaves/test.nim(14, 2) Hint: 'PWorld' is declared but not used [XDeclaredButNotUsed]
21:22:08tylerenimcache/teaves_test.c:105:35: error: operand of type 'tfield77009' (aka 'struct tfield77009') where
21:22:08tylere arithmetic or pointer type is required
21:22:10tylere field_77137 = &((tfield77009*) (row_77092[(i_77139)- 0]));
21:22:35tylereApple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
21:22:35tylereTarget: x86_64-apple-darwin12.5.0
21:22:38faassenyeah, that is the line on which it fails for me.
21:22:45Araqmake TField an object and try again
21:22:46tylerenimrod compiled for git a few days ago
21:22:51faassengcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
21:22:55Araqyeah yeah yeah I know I know
21:23:12Araqdon't spam the channel
21:23:29faassenyeah, now it works.
21:25:07faassenI'm quite excited again in having possibly found a compiler bug that's not a stack overflow this time!
21:27:01Araqcongrats you found a compiler bug
21:27:10faassenyay! :)
21:28:43NimBotAraq/Nimrod master c93951e Araq [+0 ±12 -0]: implemented 'injectStmt'; more debug support
21:28:43NimBotAraq/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:10OrionPKMaraq is it possible to make inject stmt scoped?
21:32:18OrionPKMI could see it being useful for unit testing cleanup/teardown
21:33:03Araqsure it's possible. will I do it? no. because it's for my debugging pleasure and not for your unit testing pleasure
21:33:23OrionPKM:P
21:33:43OrionPKMas if I would derive pleasure from writing unit tests
21:34:51Araqa more polite answer: scope based statement injection is easy to do with a macro
21:35:13AraqinjectStmt is for the cases where a macro doesn't work easily
21:35:45OrionPKMugh
21:35:46OrionPKMwhat was that
21:35:48OrionPKMdon't do that anymore
21:36:50gradhayaman, go write that macro and PR it to the tutorial
21:38:10OrionPKMwhat macro
21:40:51Araqdo what again? being polite?
21:40:53gradhaa scope based injectStmt
21:42:52*tylere quit (Remote host closed the connection)
21:43:25OrionPKMbeing polite doesnt suit you
21:43:33OrionPKMI come here to be belittled and made to feel incompetant
21:46:07EXetoCme too
21:46:21gradhaI 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:20faassenAraq: I believe you. there are cultural aspects to this, I think, too.
21:48:40faassenAraq: I'm Dutch. we got a reputation for bluntness. :)
21:48:55faassenand when you talk to Guido van Rossum, well.. it fits.
21:52:02Araqnever talked to him, talked to Larry Wall once
21:52:17Araqhe's as crazy as you'd think :P
21:52:38faassenI saw him talk once or twice, but it was about a decade ago.
21:52:42faassennever talked to him.
21:52:48faassenI've had flaming arguments with Guido. :)
21:53:18faassenGuido'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:33Araqflaming arguments about what?
21:54:16faassenI suggested back in 2007 that I wasn't that excited about backwards compatibility breaking Python 3.
21:54:31faassenbecause I had a lot of code.
21:55:07faassenthat 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:53faassenI 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:05faassenbut that code looks pretty ugly, so puts the maintenance burden to the library developers.
21:56:33faassenso about that time I went to a python conference and met Guido in the airport. :)
21:58:46faassenand he read my blog posts about it and he was not pleased.
21:59:05gradhafaassen: give us your blog address
21:59:15brihat^
21:59:18faassenhttp://blog.startifact.com/posts/older/brief-python-3000-thoughts.html
21:59:24faassenand followups.
21:59:33*DAddYE quit (Ping timeout: 248 seconds)
21:59:56faassenI stopped blogging about Python 3 after that. :)
22:01:00gradhamy 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:11faassenanyway, 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:27gradhabut then, I stopped caring about Python long ago, so I wouldn't argue much
22:01:30faassengradha: yeah.. well, that's Python 3's strength and weakness at the same time.
22:01:53faassengradha: python 3 avoids the total rewrite phenomenon so it actually *exists*, unlike, say, Perl 6 which had a much harder road.
22:02:18faassengradha: 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:40Trixar_zaThat and most of us are too lazy
22:02:49faassenTrixar_za: yeah. and it costs money, if you're in business.
22:02:56gradhafaassen: you should blog about how nimrod sucks because tuples and arrays are broken, drama brings in more people than correct posts
22:03:22Trixar_zaHey, I'll get on that bandwagon
22:03:23Trixar_za:P
22:03:33faassengradha: yeah, I noticed, but I try to be nice. :)
22:04:07faassengradha: oh, you mean more people for *Nimrod*? yeah, good marketing.
22:04:09gradhabeing nice alienates OrionPKM, so don't do it
22:04:16Trixar_zaOh hey, faassen, did you see that they've restarted irclib again - now they call it irc though
22:04:21faassengradha: oh, sorry OrionPKM, I mean, totally NOT sorry!
22:04:29Trixar_zaIt's also ported to Python 3
22:04:39OrionPKMpreciated
22:04:42faassenTrixar_za: I have no idea what irclib even is. :)
22:04:59faassenTrixar_za: oh, a Python library?
22:05:01Trixar_zaThe python library for writing IRC related content
22:05:35faassenanyway, I am just enjoying the whole "frontier" feel of Nimrod, so it doesn't suck for me. :)
22:05:47Trixar_zaWas 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:56faassenat least it gives me broken stuff early and often. :)
22:06:22Trixar_zaI 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:24faassenTrixar_za: there are so many Python libraries, I can't keep track of what's going on. I like 'defecto standard' :)
22:07:40brihatnice blog post faassen
22:08:37faassenbrihat: thanks, I wrote it looong ago. :)
22:09:31*Araq read it a long time ago
22:11:18faassenAraq: 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:58faassenAraq: me too!
22:12:38shodan45the internet was around when you were little?
22:12:54faassenAraq: 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:39Araqwhat I thought? dunno, most likely "yeah good rant" because I love rants
22:14:17faassenhehe.
22:14:30Trixar_zaIt's a pretty good argument if you ask me
22:14:35faassenshodan45: who are you asking, me or Araq?
22:15:05Araqshodan45: I'm not as old as you think
22:15:12Araq... perhaps
22:15:24brihatnow Araq will terll us his age
22:15:38Trixar_zaor lie about it like a woman
22:16:07Araqor be quiet like I always do when it comes to personal things
22:16:29shodan45faassen: was rhetorical :P
22:17:49faassenshodan45: hey, well, but who are you asking rhetorically? :)
22:18:39Trixar_zaWhat does the V in VNUG stand for? Voice? Nimrod User Group
22:18:58gradhaV for Varriount
22:19:12Trixar_zaOh and I figure that Araq is atleast in his late 20s if he remembers System Shock
22:20:48Araqmuhaha 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:09OrionPKMI bet araq is a teenage prodigy
22:28:12OrionPKMhe's actually 15
22:28:19Trixar_zaYeah right Araq
22:28:27Trixar_zaSystem Shock 2 came out in 1999
22:28:33OrionPKMI'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:20brihatAraq's profile: http://osrc.dfm.io/araq
22:33:52brihatJust 17%? I thought he wrote > 50% of Nimrod code out there
22:33:53OrionPKMlol
22:34:19OrionPKMDominik is more of a Java aficionado
22:34:20OrionPKMbwahahaha
22:41:14Trixar_zaIt's not really all that accurate
22:41:24Trixar_zahttp://osrc.dfm.io/trixarian
22:41:28Trixar_zaI barely know perl
22:42:13faassenit claims I do most of my commits in the early morning. certainly not. :)
22:43:45brihatAccording to the pic here: https://thestrangeloop.com/sessions/nimrod-a-new-approach-to-meta-programming
22:43:58brihatAraq definitely doesn't look like 15!
22:45:04OrionPKMgerman 15 is not like the rest of the world's 15
22:46:40Trixar_zaYet you can still go to jail for it
22:47:20Trixar_zaBut 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:24brihatAraq, are there slides or videos of your talk at this Strange Loop presentation?
22:48:00gradhahttp://nimrod-lang.org/talk01/slides.html
22:48:03Araqthe slides are on our website and I still have no idea when the vid will be released
22:48:10dom96i'm a Java what now?
22:48:14Araqgood night
22:48:37brihatOh, is that the same one
22:49:11OrionPKMdom96 you're a java expert, gj
22:51:03dom96That's not really an achievement. A well trained monkey could easily be a Java expert.
22:51:25brihatmy manager calls them java monkeys
22:54:19brihatwhy wasn't 0.9.4 released today? Araq had promised
22:54:51fowlmouthlol
22:54:55*radsoc quit (Ping timeout: 245 seconds)
22:55:03fowlmouthi think there is a lot to do for 0.9.4
22:55:15gradhaAraq didn't commit to a specific year
22:55:20Araqwell ... plans never work out
22:55:52Araqyou plan so that you notice when you're off
22:55:56fowlmouth0.9.2.2 maybe
22:56:14fowlmouthgn all
22:56:33brihatme dumb, didn't get that joke yesterday
22:56:51AraqI still think we might make a release this year
22:57:13Araqbut tbh bug fixing is happening way too slow
22:58:38brihatno probs, i'm always up to git master branch.. so it's ok
23:10:35brihatwhoa, Nimrod is being taught in universities already.
23:10:38brihathttp://www-usr.inf.ufsm.br/~vinileal/elc117/t1/
23:11:05brihatLooks Brazilian, "Programming paradigms"
23:11:18*DAddYE_ quit (Read error: Connection reset by peer)
23:11:37*DAddYE joined #nimrod
23:12:42EXetoCwoot
23:13:14*faassen waves good night. :)
23:13:21faassent'was fun, thanks!
23:13:27Trixar_zaNight faassen
23:13:31brihatby faassen
23:13:44Araqgood night
23:13:45*faassen left #nimrod (#nimrod)
23:13:47Araq(again)
23:13:58Trixar_zaGoodnite Araq
23:15:37chat1is there anyway to have nimrod output the possibilities when it encounters a ambiguous type?
23:16:06gradhachat1: it usually tells you what it got and what types it expected
23:19:21chat1gradha: 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:29chat1ah... no, that's just my misstake... i actually call the cuint type casts on x and y
23:21:35gradhaI 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:37brihatchat1: it's the irc syndrome. You'll find answer to your own question just after you post it to irc
23:26:40chat1brihat: ah, no, that was just my assumption that was wrong... the error persists
23:26:58chat1Here 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:48brihatbye bye
23:32:52gradhachat1: that example is not correct nor self contained, so it's difficult to reason about
23:33:01gradhachat1: I made some tweaks to get https://gist.github.com/gradha/7996913
23:33:44gradhayou 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:21gradhaif 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:51gradhathis happens because you can't call addr on parameters or let variables
23:36:43chat1gradha: ah, hang on, fixing the example
23:37:26chat1https://gist.github.com/KoFish/7996768
23:37:48chat1thanks for the help
23:38:51gradhachat1: if you change the last colon to an equal sign it works
23:39:08gradha"proc put*(cell: var tb_cell; x, y: int) ="
23:39:11*DAddYE__ quit (Read error: Connection reset by peer)
23:39:22chat1oh.. ffs >_<
23:39:27chat1thanks!
23:39:32gradhathe colon tells nimrod the proc returns a value, and expects a type
23:39:38*DAddYE joined #nimrod
23:40:29chat1yep
23:40:42chat1now i feel even more stupid :P
23:41:48gradhadon't worry, in the beginning it happens a lot to change : with = and viceversa
23:43:31chat1yeah, well, now I know what that error means :P
23:44:19gradhain the beginning the erros don't tell much, but it's also sometimes hard to guess the intention of the programmer
23:48:13gradhagood 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)