<< 18-05-2014 >>

00:12:06*DAddYE joined #nimrod
00:53:23*hoverbear joined #nimrod
01:08:33*hoverbear quit ()
01:17:51*hoverbear joined #nimrod
01:27:58*hoverbear quit ()
01:33:16*DAddYE quit (Remote host closed the connection)
01:33:42*DAddYE joined #nimrod
01:38:15*DAddYE quit (Ping timeout: 252 seconds)
01:38:30*hoverbear joined #nimrod
01:46:44*springbok quit (Ping timeout: 255 seconds)
01:49:54*springbok joined #nimrod
01:50:10*springbok quit (Changing host)
01:50:10*springbok joined #nimrod
02:22:49*hoverbear quit ()
02:34:18*DAddYE joined #nimrod
02:38:18*DAddYE quit (Ping timeout: 240 seconds)
02:44:21*q66 quit (Quit: Leaving)
02:58:41*hoverbear joined #nimrod
02:59:08*Varriount|Mobile joined #nimrod
02:59:52Varriount|MobileThis is an odd comment towards Nimrod -> http://www.reddit.com/r/Python/comments/25tvdj/what_are_your_thoughts_on_nimrod/chkp88m
03:00:22Varriount|MobileHow could having macros be interpreted as a deal breaker?
03:05:13fowlVarriount, in the same way that having too many libraries could be seen as a bad thing
03:05:26fowlor your program running too fast
03:06:51Varriount|MobileIt's not like macros are even used that much...
03:07:26fowlits like openning the fridge and seeing 8 tasty snacks instead of 1
03:07:40fowlmaking decisions is hard :/
03:08:48Varriount|Mobilefowl: Or like being presented with a tasty chocolate cake when you're on a diet?
03:08:48renesacVarriount|Mobile, they are afraid of how you can change the syntax (not really true for nimrod), declare variables invisibly, etc
03:09:29renesacin sum, they think it is a too powerful feature that can be used to do evil
03:10:17Varriount|MobileIf you follow that logic, Java is the perfect language, not Python
03:10:24renesacindeed
03:11:07Varriount|MobilePython supports all sorts of wierd things, many of which are akin to macros
03:11:54fowlpython has some kind of eval that can be used for metaprogramming, doesnt it
03:12:24renesacfowl, it is ugly, decent python programmers don't use it
03:12:35fowlFirefox can't find the file at http://www.reddit.com/r/Python/comments/25tvdj/what_are_your_thoughts_on_nimrod/.
03:12:44fowlis my internet futzing
03:12:55renesacit opens for me
03:13:04Varriount|Mobilerenesac: Ever used named tuples?
03:13:12fowlhrm
03:13:16renesacin python?
03:13:20renesacI think once
03:13:22Varriount|MobileYeah
03:13:40Varriount|MobileThose are supported by eval()
03:14:06renesachum
03:14:13renesacyeah, that is a good example
03:14:22renesacdidn't know that
03:18:32*Varriount|Mobile quit (Ping timeout: 255 seconds)
03:19:20*xtagon_ joined #nimrod
03:21:15*Varriount|Mobile joined #nimrod
03:22:30Varriount|MobileSorry for the disconnect. I'm currently babysitting (kids are asleep, but parents are still away) so I'm relying on a weak cell signal
03:23:07*xtagon quit (Ping timeout: 252 seconds)
03:34:13*Varriount|Mobile quit (Remote host closed the connection)
03:45:00*hoverbear quit ()
03:45:24*hoverbear joined #nimrod
04:07:28*bjz_ joined #nimrod
04:07:32*bjz quit (Read error: Connection reset by peer)
04:11:10*bjz joined #nimrod
04:13:35*bjz_ quit (Read error: Connection reset by peer)
04:14:16*hoverbear quit ()
04:15:09*hoverbear joined #nimrod
04:15:29*flaviu1 joined #nimrod
04:33:22*hoverbear quit ()
05:02:38*hoverbear joined #nimrod
05:02:41*hoverbear quit (Max SendQ exceeded)
05:03:20*hoverbear joined #nimrod
05:25:37*flaviu1 quit (Quit: Leaving.)
05:30:18Demos_macros are SOOOO much less evil than a textual preprocessor, although harder to understand I think.
05:30:22Demos_Not harder to use though
05:36:31*xtagon_ quit (Quit: Leaving)
06:18:03*springbok quit (Ping timeout: 258 seconds)
06:29:59*springbok joined #nimrod
06:30:23*springbok is now known as Guest95211
06:38:54fowllogged into reddit to upboat you guys
06:39:03fowlyes, a little piece of me died in the process
06:46:38*Demos_ quit (Read error: Connection reset by peer)
06:52:37*hoverbear quit ()
06:57:55*Guest95211 quit (Ping timeout: 258 seconds)
07:04:11*Varriount|Mobile joined #nimrod
07:04:38Varriount|Mobilefowl: I hope that piece of you had a well deserved funeral
07:06:24*Varriount|Mobile quit (Read error: Connection reset by peer)
07:06:30*Varriount-Mobile joined #nimrod
07:08:58*Guest95211 joined #nimrod
07:09:06*Varriount-Mobile quit (Read error: No route to host)
07:11:48*ehaliewicz joined #nimrod
08:10:41*kunev joined #nimrod
08:29:07*vendethiel joined #nimrod
08:40:43*lyro joined #nimrod
08:47:29*ehaliewicz quit (Ping timeout: 255 seconds)
09:05:13*lyro quit (Remote host closed the connection)
09:12:11*Matthias247 joined #nimrod
09:16:12*BitPuffin joined #nimrod
09:25:45*BitPuffin quit (Ping timeout: 252 seconds)
09:35:40*BitPuffin joined #nimrod
10:23:11*lyro joined #nimrod
11:05:10*lyro quit (Ping timeout: 258 seconds)
11:24:46*BitPuffin quit (Ping timeout: 265 seconds)
11:27:51*noam quit (Ping timeout: 252 seconds)
11:49:16*EXetoC quit (Quit: EXetoC)
12:11:39*untitaker quit (Ping timeout: 265 seconds)
12:13:55*Guest95211 quit (Ping timeout: 240 seconds)
12:16:42*untitaker joined #nimrod
12:34:38*EXetoC joined #nimrod
12:38:25*darkf quit (Quit: Leaving)
12:43:42*kunev quit (Quit: leaving)
12:47:13EXetoCfowl: is mrb_irep the first undeclared symbol for you? it works if I include irep.h directly
13:11:41*q66 joined #nimrod
13:11:41*q66 quit (Changing host)
13:11:41*q66 joined #nimrod
13:24:31EXetoCfowl: you said that no shared lib is generated, so why are you linking?
13:32:43*BitPuffin joined #nimrod
13:44:07EXetoCmrb_open for example is defined in state.c
14:28:02EXetoCor did you just say you didn't want to do dynamic linking?
14:43:02*Matthias247 quit (Read error: Connection reset by peer)
15:38:29*flaviu1 joined #nimrod
15:42:00flaviu1https://docs.google.com/viewer?url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2FE%2FA%2FD%2FEADEC33E-FBA3-43BF-9226-427BDAC27610%2FRoslyn%2520Project%2520Overview.docx
15:42:56flaviu1its really worth at least skimming over, Roslyn does some really neat stuff that Nimrod can almost do
15:57:20*kunev joined #nimrod
15:57:54*flaviu1 quit (Quit: Leaving.)
16:17:43*nicolastarzia joined #nimrod
16:19:41*Guest95211 joined #nimrod
16:47:52*kunev quit (Ping timeout: 258 seconds)
16:58:20*hoverbear joined #nimrod
16:59:42*Skrylar quit ()
17:01:18fowlEXetoC, cant do dynamic linking
17:03:49*n1colastarzia joined #nimrod
17:06:32*nicolastarzia quit (Ping timeout: 255 seconds)
17:10:07*Demos_ joined #nimrod
17:16:16*kunev joined #nimrod
17:17:47EXetoCfowl: ok so how do I include the definitions?
17:18:03*hoverbear quit ()
17:23:37fowlEXetoC, idk :x the c version works fine with just mruby.h and mruby/compile.h
17:25:12EXetoCfowl: {.emit: slurp...? :>
17:29:08fowlslurp what?
17:31:32EXetoCan alias for staticRead ofc! even though Slurp is the magic name
17:32:23fowlhow would it help
17:38:32*hoverbear joined #nimrod
17:39:33EXetoCfowl: because the definitions get injected into the TU
17:41:31EXetoC"undeclared identifier" is how far I got, then I emitted the content of state.c and got rid of some of those errors
17:45:00EXetoCand now it's looking for mrb_load_string which is generated from some yacc file
17:48:59EXetoCI can just use the generated file
17:49:09*hoverbear quit ()
17:59:31fowlmrb_load_string is in mruby/compile.h
18:00:24EXetoCjust the declaration
18:01:07fowlEXetoC, its in libmruby.a
18:01:32fowlthe c ex. works fine https://gist.github.com/fowlmouth/ddcc02d2ce03403cee36#file-test-c
18:09:09EXetoCfowl:30d29
18:09:11EXetoC< {.pragma: hirep, header: "<mruby/irep.h>".}
18:09:13EXetoC37c36
18:09:15EXetoC< mrb_irep* {.importc,hirep.} = object
18:09:17EXetoC---
18:09:19EXetoC> mrb_irep* {.importc,h.} = object
18:10:36EXetoCnimrod c --passl:-lm --cincludes:./include --clibdir:./build/host/lib --parallelBuild:1 -r mruby
18:18:06fowlnimrod will always add -lm
18:18:43*kunev quit (Ping timeout: 240 seconds)
18:19:32*kunev joined #nimrod
18:19:48EXetoCwell I added it because the math symbols couldn't be located
18:19:48fowlah needed import math
18:19:53EXetoCoh
18:20:10fowlEXetoC, thanks homie, i just dont understand how the c example doesnt have to reference irep.h or any of that :/
18:29:56EXetoCfowl: I don't know. because of gcc -c?
18:31:37fowlwhats that
18:32:09fowl -c Compile and assemble, but do not link
18:32:09fowleh
18:34:12EXetoCor because mrb_irep is actually used there, while it isn't used in that test
18:35:21EXetoCirep.h isn't being included either directly or indirectly in that test
18:49:52fowlEXetoC, yeah but no code should be emitted from mruby.nim
18:50:39fowlthese shouldnt be there: typedef N_CDECL_PTR(void, TY98393) (mrb_state* mrb, mrb_irep* irep, mrb_code* p
19:04:36EXetoCok so it doesn't handle proc fields correctly
19:08:30EXetoClet's just port the thing. only 47214 lines :p
19:13:54EXetoCwhere do we put it? in nimrod-code?
19:15:44EXetoCthat seems appropriate. what exactly goes there? official tools, and "core" wrappers?
19:19:58Araqyup
19:20:46fowlmaintaining a port doesnt sound fun
19:20:55fowlunless of course you can just c2nim the whole project
19:21:19Araqwe need a general patch+c2nim+patch tool
19:21:20*hoverbear joined #nimrod
19:21:33Araqso wrappers/ports can easily be kept up to date
19:28:42Demos_is there an example of perfect forwarding someplace, I seem to remember that one can do it, but I forget how
19:29:29fowli think there is a pragma for it
19:29:59AraqI think it's possible with a macro in theory
19:30:13Araqbut in practice the lack of a type API seriously hurts
19:30:42fowlgo's generics (interface{}) looks horrible
19:31:32*hoverbear quit ()
19:31:41Demos_yeah, you use like a varargs[expr] and you can shove the whole deal to another proc
19:31:44Demos_right?
19:32:38AraqDemos_: right
19:32:48AraqI described the details on the forum somewhere
19:34:42*io2 joined #nimrod
19:35:10*bjz_ joined #nimrod
19:35:24*bjz quit (Read error: Connection reset by peer)
19:36:45*kunev quit (Quit: leaving)
19:38:26*nande joined #nimrod
19:42:10*Matthias247 joined #nimrod
19:44:31EXetoCis nimborg supposed to be just a collection of libs?
19:44:54Araqwho knows
19:56:37*hoverbear joined #nimrod
20:14:14*xenagi joined #nimrod
20:16:53*xenagi quit (Client Quit)
20:22:01*nande quit (Ping timeout: 276 seconds)
20:22:04*Guest95211 is now known as springbok
20:22:15*springbok quit (Changing host)
20:22:15*springbok joined #nimrod
20:23:53*BitPuffi1 joined #nimrod
20:25:52*BitPuffin quit (Ping timeout: 240 seconds)
20:27:07*renesac quit (Quit: Leaving)
20:32:43*Mat3 joined #nimrod
20:32:52Mat3good evening
20:34:23Araqhi Mat3
20:34:28*hoverbear quit ()
20:40:10*whoot joined #nimrod
20:42:07whootHi. I'm feeling dumb at this point, been trying to figure this out for a while: how do I get a string from a cstring?
20:42:09Mat3hi Araq
20:42:22Demos_$
20:42:24Mat3what's new ?
20:42:30Demos_just $thing where thing is a cstring
20:42:54Demos_we should really make that more clear in the manual
20:43:25Araqhi whoot welcome
20:43:26whootgosh, it's actually a ptr cstring
20:43:50whoothi Araq
20:43:53whootthanks
20:44:01Araq$foo[] then
20:44:33Araqalso check if it's really a "ptr cstring" and shouldn't be a cstringArray instead
20:45:54whootmy bad
20:46:06whootprintf("%s\n", err) <- works
20:46:17whootecho $err <- does not
20:46:30whoot Error: type mismatch: got (proc (varargs[T]), ptr cstring)
20:46:33Araq#! strongSpaces
20:46:41Araqadd this as your first line
20:46:43Araqor use
20:46:48Araqecho($err)
20:47:31Araqit's a common gotcha
20:48:09whootok, getting somewhere now
20:48:20whootecho($err)
20:48:29whootError: type mismatch: got (ptr cstring)
20:48:51Araqwho declared 'err'?
20:49:04whootI'm a noob, probably did something very wrong
20:49:16Araqyup, you didn't use c2nim :P
20:49:28Araqchar* is 'cstring', not 'ptr cstring'
20:49:33whootI'm calling a c library which demands a char **err
20:49:55Araqif err is char** how can printf work the way you described?
20:49:56whootif there is an error, it sets the pointer to a value
20:50:07whootlet me check
20:50:11fowlwhoot, i recommend you use `var cstring` instead
20:50:41whootthe function has last arg err: ptr ptr cstring
20:50:50whootwell that's what I put in there
20:51:05fowlwhoot, *char is cstring, **char is ptr string
20:51:08fowlptr cstring*
20:51:48whootI have a ptr cstring somewhere and i pass addr(x) to the fn
20:52:03whootsorry, to the proc.
20:52:23fowlcan you paste it somewhere
20:52:37whootyeah, but I'm hesitant to embarass myself
20:52:53Araqdon't worry, you already did :D
20:53:08whootlol
20:54:26whoothttp://pastebin.com/px1fmzFc
20:54:38Mat3ciao
20:54:42*Mat3 quit (Quit: Verlassend)
20:55:19whootthe while true is idiotic, i was checking out whether i was leaking memory, please disregard
20:56:02EXetoCeveryone does stupid things
20:56:20whootI tried c2nim but I was confused by the result, I will try again later once I have a better grasp of the language :)
20:57:37EXetoCof what? usually you want to remove things like blocks introduced by header guards and such
20:57:53*n1colastarzia quit (Ping timeout: 264 seconds)
20:58:29whootyes, I also had some structs that were defined in other header files and anyways I decided to go macho and do the interfacing by hand
20:58:48whootjust as an exercise to learn the lang
20:58:48fowlwhoot, ok, change the structure to hold a cstring, change leveldb_open to take `var cstring` and when you call it just pass db.err
20:59:09fowlwhoot, i just checked leveldb_open() it takes char** for err
21:00:27whootyes, I thought ptr ptr cstring was that. probably one ptr too many right?
21:00:36fowlyea
21:00:43fowlas been said, cstring is ptr char
21:01:09fowlso ptr ptr cstring is char***
21:02:40whootleveldb_open should take ptr cstring then right?
21:03:05fowlwhoot, yea
21:03:15whootomg yes it works
21:03:27whootthanks guys
21:04:32fowlbtw you can echo a cstring, no need for printf
21:05:01whootyeah, got rid of the printf now
21:27:52*xtagon joined #nimrod
21:35:59*hoverbear joined #nimrod
21:42:29whootno such thing as private methods, right?
21:42:54EXetoCyou can choose not to export certain symbols by omitting *
21:45:17whootthanks sir
21:45:30whooti'll call it a day, thanks for your help!
21:46:09EXetoCno problem
21:48:41*hoverbear quit ()
21:48:47*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
21:49:44*whoot quit (Quit: Leaving)
22:13:33*springbok quit (*.net *.split)
22:13:33*Varriount quit (*.net *.split)
22:13:35*oxful__ quit (*.net *.split)
22:13:38*betawaffle quit (*.net *.split)
22:13:38*jez0990 quit (*.net *.split)
22:13:39*Matthias247 quit (*.net *.split)
22:13:42*dymk quit (*.net *.split)
22:13:44*dLog quit (*.net *.split)
22:13:45*Amrykid quit (*.net *.split)
22:13:45*mal`` quit (*.net *.split)
22:13:48*untitaker quit (*.net *.split)
22:13:50*zahary quit (*.net *.split)
22:13:52*Demos_ quit (*.net *.split)
22:13:53*Xuerian quit (*.net *.split)
22:13:54*icebattle quit (*.net *.split)
22:14:29*nande joined #nimrod
22:18:38*nande quit (Ping timeout: 240 seconds)
22:19:21*icebattle joined #nimrod
22:19:46*noam joined #nimrod
22:19:46*Matthias247 joined #nimrod
22:19:46*Demos_ joined #nimrod
22:19:46*springbok joined #nimrod
22:19:46*untitaker joined #nimrod
22:19:46*Varriount joined #nimrod
22:19:46*Xuerian joined #nimrod
22:19:46*betawaffle joined #nimrod
22:19:46*jez0990 joined #nimrod
22:19:46*oxful__ joined #nimrod
22:19:46*mal`` joined #nimrod
22:19:46*Amrykid joined #nimrod
22:19:46*dLog joined #nimrod
22:19:46*dymk joined #nimrod
22:19:46*17SAAEO6V joined #nimrod
22:19:46*zahary joined #nimrod
22:20:21*17SAAEO6V quit (Write error: Broken pipe)
22:23:50dom96looks like I need to look at r/nimrod more often
22:23:51dom96http://www.reddit.com/r/nimrod/comments/25sbjp/how_can_nimrod_become_more_popular/
22:24:22*nande joined #nimrod
22:32:48fowldom96, ill look into reddit hooks and see if i can whip up a listener
22:33:01dom96fowl: Integrate it into nimbot please
22:34:03fowlalright
22:34:17*hoverbear joined #nimrod
22:48:55*Matthias247 quit (Read error: Connection reset by peer)
22:48:57*hoverbear quit ()
22:51:42*hoverbear joined #nimrod
22:53:12*nande quit (Read error: Connection reset by peer)
22:54:32*Kazimuth joined #nimrod
22:58:59*flaviu1 joined #nimrod
22:59:29Araqhi Kazimuth welcome
23:00:40Araqflaviu1: believe it or not, but I skimmed Roslyn's code weeks ago
23:00:52flaviu1How was it?
23:02:38Araqparts are excellent, parts are stupid
23:03:06Araqno idea how can one seriously consider the visitor pattern for a compiler in 2013
23:06:22Kazimuthhey Araq
23:08:51*darkf joined #nimrod
23:12:36dom96Araq: Could we get [-2 .. -1] down to [-2 ..]?
23:13:13Araqas I said, yes
23:13:22dom96you did?
23:13:27Araqbut it requires 2 language additions
23:13:34Araqwe recently talked about it, dom96
23:13:44dom96we as in me and you?
23:13:58Araqwe as in some guys here in #nimrod
23:14:04dom96ahh
23:14:06dom96Good.
23:14:13dom96Well i'm writing a reply to some guy on reddit
23:14:29dom96and I wrote "... the beauty with Nimrod is that I can suggest that to the creator of Nimrod right now at #nimrod on freenode ;)"
23:14:31dom96:P
23:15:52Demos_Araq: why would anyone use the visitor pattern AT ALL in 2013 :D
23:17:24*hoverbear quit ()
23:18:45AraqDemos_: true
23:25:39fowlmost oop languages require it to get around not having dynamic dispatch
23:25:49Demos_fowl: multiple dispatch
23:25:50fowler multiple dispatch
23:26:34Araqfowl: C# has closures and multi methods and all this stuff
23:26:55Demos_Araq: c#'s multimethods are a little strange though right?
23:27:07Araqbut this way of structuring the code makes no sense for a compiler
23:27:27Araqyou get rid of 1 single level of case/pattern matching
23:27:40Demos_does the visitor pattern have advantages over some multimethod implementations wrt stuff like ABIs and using them across dynamic libraries?
23:28:03Araqand then nobody matches f(g(x, y)) via the visitor pattern because that makes your brain explode
23:29:06Araqit's hard to come up with other examples that scale as badly as the visitor pattern for compilers
23:29:34Demos_I find even double dispatch with visitors very unnatural and brain exploading
23:29:45Demos_maybe for stuff like traversing a graph, but still
23:32:19AraqI like the names in the classical visitor pattern ... "accept" ... WTF?!
23:32:37Araqand people tell me my 1 letter vars are bad :P
23:34:59flaviu1Araq: I can't grep for 1 letter vars, but they are somewhat readable in the shorter methods
23:41:53Araqok, good night
23:46:51EXetoCI haven't seen any 1-letter identifiers at the module scope though, fortunately
23:55:57*boydgreenfield joined #nimrod
23:57:34Demos_yo EXetoC: does opengl call glGetError in release mode?