<< 22-01-2014 >>

00:00:57EXetoCdo you ever return arrays?
00:01:10DemosThere are quite a lot of times when you want to have a function like that run with different constants each run, and would rather not pass them in each time. I guess a plain old structure would work OK
00:02:14*easy_muffin joined #nimrod
00:02:37AraqDemos: you can do a lot with pragmas
00:04:24Araqbut it looks like you simply want var data {.gpu.}: array
00:04:46Araqand then access 'data' in your gpu proc
00:09:32Demosyeah, that works, although I spose it would not be an array
00:10:05Demosanyhow are you targeting shading languages or compute languages?
00:10:26*Archaeologist joined #nimrod
00:10:47*Archaeologist left #nimrod ("I'm a happy Miranda IM user! Get it here: http://miranda-im.org")
00:12:00Araqopencl
00:20:39Araqgood night
00:24:18*easy_muffin quit ()
00:24:38*brson joined #nimrod
00:28:32*BitPuffin quit (Ping timeout: 252 seconds)
00:31:43*Demos quit (Ping timeout: 272 seconds)
00:33:19*Demos joined #nimrod
00:35:02*xenagi joined #nimrod
00:42:13*vbtt quit (Quit: Page closed)
00:48:57*brson quit (Remote host closed the connection)
00:49:12*brson joined #nimrod
01:06:21*EXetoC quit (Quit: WeeChat 0.4.2)
01:53:25*brson quit (Ping timeout: 272 seconds)
02:09:29*LordAndrew joined #nimrod
02:14:46*Icefoz joined #nimrod
02:15:29LordAndrewevenin'
02:16:50VarriountHi LordAndrew
02:17:30VarriountI'm not gonna be on much tonight - I have an english essay to write, among other things.
02:21:48LordAndrewouch
02:22:35DemosAt least you don't have a whole math assignment that you should really have done more of on the weekend....
02:30:46LordAndrewHmm.
02:32:12LordAndrewhttps://gist.github.com/Lordovos/8552530
02:33:20*DAddYE quit (Remote host closed the connection)
02:33:35LordAndrew...err. Whoops. There's something wrong with some of that.
02:54:49*Icefoz quit (Ping timeout: 252 seconds)
03:09:36*Icefoz joined #nimrod
03:36:27*Demos quit (Ping timeout: 260 seconds)
03:36:28*DAddYE_ joined #nimrod
03:36:39*DAddYE_ quit (Remote host closed the connection)
03:36:46*DAddYE_ joined #nimrod
03:40:27*Demos joined #nimrod
04:10:01*psquid quit (Ping timeout: 246 seconds)
04:18:05*Icefoz quit (Quit: Lost terminal)
04:18:22*psquid joined #nimrod
04:27:26*dmac joined #nimrod
04:28:18*dmac quit (Client Quit)
04:29:07*Demos quit (Ping timeout: 272 seconds)
05:03:13*Demos joined #nimrod
05:26:58*xenagi quit (Remote host closed the connection)
05:33:27*LordAndrew quit (Quit: Page closed)
05:34:24*LordAndrew joined #nimrod
05:38:08*LordAndrew quit (Client Quit)
05:41:57*LordAndrew joined #nimrod
05:42:55*LordAndrew left #nimrod (#nimrod)
05:43:54*LordAndrew joined #nimrod
05:46:00*brson joined #nimrod
06:22:32*ddl_smurf joined #nimrod
06:46:59*shodan45 quit (Ping timeout: 240 seconds)
07:19:23*Demos quit (Read error: Connection reset by peer)
07:45:07*LordAndrew quit (Quit: Out.)
07:51:47*BitPuffin joined #nimrod
08:30:53*odc joined #nimrod
08:33:10*DAddYE_ quit ()
08:34:40*brson quit (Quit: leaving)
08:48:22*Araq_ joined #nimrod
09:00:47*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
09:22:05*Atheist joined #nimrod
09:22:27*Atheist is now known as Guest43493
09:22:58*Guest43493 quit (Read error: Connection reset by peer)
09:32:14*CarpNet joined #nimrod
09:36:19*BitPuffin quit (Ping timeout: 260 seconds)
09:42:42*noam quit (Read error: Connection reset by peer)
09:43:09*noam joined #nimrod
10:24:51*easy_muffin joined #nimrod
10:39:01*Araq_ joined #nimrod
10:39:40bbodiHi all! How can I convert a fixed size char array to a string?
11:06:16Araq_$
11:06:27*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
11:08:12Araqbbodi: toString is $ in nimrod
11:15:46bbodiHi Araq! Thank you.
11:21:57*BitPuffin joined #nimrod
11:23:39*faassen joined #nimrod
11:48:30*EXetoC joined #nimrod
12:34:46dom96You guys got any optimisation tips for https://github.com/dom96/ParticleBench/blob/master/N.nim ?
12:43:51*easy_muffin quit ()
12:50:12BitPuffindom96: ping me later this evening and I'll have a look
12:51:13dom96ok
13:25:22Araqdom96: get rid of the 'bis' field
13:25:44Araqinstead of setting it to false, swap the invalid point with the last point
13:26:02*xenagi joined #nimrod
13:26:05Araqno need for the bis check in renderPts this way
13:27:00AraqcleanupPtPool() is not necessary then anymore
13:29:58Araqnot sure if it improves anything
13:30:10Araqare you allowed to use the || iterator, dom96 ?
13:30:21dom96no idea
13:31:32dom96we're pretty close to C performance anyway
13:31:54dom96The Go implementation doesn't use goroutines
13:31:59dom96so it would be unfair to use ||
13:32:31Araqpretty close ain't good enough, disassemble both and see what's different :P
13:32:45AraqI'm tired of measuring things when you can look at the assembler instead
13:32:51dom96I have better things to do.
13:32:56Araqso do I
13:33:14BitPuffinnow fight
13:33:26dom96We should get good PR anyway
13:37:31Araqpass more stuff via parameters btw
13:37:58dom96I think I will just keep it as it is.
13:38:06dom96All the other implementations are written like this.
13:38:35Araqensure gcc uses the AVX instructions
13:39:35dom96how?
13:39:46Araq-march or something like that
13:40:03Araqalso you should at least try an unroll iterator
13:40:20Araqtrivial to do in nimrod, pita in D,C++,C :P
13:40:35AraqI will do it later
13:40:44dom96ok
13:41:09BitPuffinAraq is getting serious
13:41:41*darkf quit (Quit: Leaving)
13:42:47dom96bbl
13:43:11Araqin fact ... use profile guided optimizations
13:44:49BitPuffinwhat's that?
13:45:41AraqBitPuffin: C's answer to just-in-time compilation ;-)
13:48:06BitPuffinAraq: Well okay, but what does that mean xD
13:48:16EXetoCoptimizations guided by profile? :p
13:48:20EXetoCprofiling
13:56:51Araqcorrection: it's -march=native
13:57:16BitPuffinwut
13:59:57BitPuffinguess it's a GCC flag?
14:00:08EXetoCyes
14:01:03BitPuffinwhat is it's daddy and what does it do
14:01:07BitPuffinits
14:01:33EXetoCsome claim that -march=native enables too much, which results in less performant code
14:02:25EXetoCAraq: when you asked me to implement JSON output, did you mean just a flat schema?
14:03:20AraqEXetoC: not really, I was thinking of supporting postgresql's arrays and its new json data type
14:06:54BitPuffinJSON output?!
14:08:09EXetoCI was thinking about much more complicated stuff, but then again I was thinking about SQL data the wrong way
14:08:14EXetoCBitPuffin: this maybe http://www.postgresql.org/docs/9.3/static/functions-json.html
14:08:26BitPuffinwell I know
14:08:33BitPuffinbut json output sounds pretty general
14:08:41BitPuffindid you mean json output out of postgres etc or wat
14:14:11EXetoCAraq: of query results?
14:15:05AraqEXetoC: instead of seq[string] == TRow returns JSON everywhere
14:15:57BitPuffinAraq: for all db's?
14:19:24EXetoCI wouldn't know how to make it generic as I haven't used the JSON functionality yet. Should the procs just assume that the columns are JSON strings?
14:21:45Araqno, you need to query the db and find out the datatype
14:22:03Araqbut some times like 'datetime' become JSON strings
14:22:08Araq*some types
14:22:19AraqBitPuffin: yes, for all of them
14:22:38EXetoCthat was my first approach, but I couldn't find a way to figure out if something was an array
14:23:23EXetoCmaybe because it was an array of user-defined types, which returned an arbitrary OID (one which didn't correspond to any built in type)
14:24:44BitPuffinAraq: that would be much better actually
14:24:50BitPuffinsucks to have everything as a string
14:25:22AraqBitPuffin: I like it this way, but I figured I'm a minority
14:27:00EXetoCI only complained because I had forgotten the little I had learned about SQL
14:27:02BitPuffinAraq: well I work around it anyway by modeling my objects as nimrod objects so it's not a huge deal
14:27:08BitPuffinjust parseInt and stuff like that
14:27:18EXetoCbut returning arrays in individual columns isn't very conventional, right?
14:27:23BitPuffinin fact json might complicate that a bit now that I think about it
14:30:53AraqEXetoC: right, that's an extension to the relational model
14:31:11Araqaccording to the relational model it's even "wrong" ;-)
14:41:07BitPuffinblown: mind
14:41:11BitPuffinno but xD
14:43:38EXetoCyeah. it might reduce the amount of necessary queries, and I partly had performance in mind, but I suspect that the caching engines are well optimized for querying the same row several times in a row
14:44:11AraqEXetoC: sounds more like you need to learn about joins
14:47:51BitPuffinjoin the dark side
14:54:18EXetoCI don't think it's relevant, but "the same row" is probably not what I meant
14:55:00EXetoCunless maybe everything is in the same table (with the help of arrays), but it's not relational then like you said
15:01:37EXetoCBitPuffin: what blew your mind? you also an SQL nub? :p
15:03:20BitPuffinEXetoC: nah I can use SQL
15:03:24BitPuffinfairly decently
15:04:13*Demos joined #nimrod
15:04:39EXetoCok
15:06:43EXetoCAraq: some people don't like seq[string] for query results? I don't know what else makes sense now that I'm less clueless
15:07:17OrionPKshouldnt it be a table structure of some sort
15:07:23OrionPKrows & columns
15:08:10OrionPKSQL queries should result in a reader object of some sort, where you read 1 row at a time, and rows have multiple cells
15:08:23BitPuffinobviously not possible, but a tuple containing the fields would be amazingly awesome
15:08:58OrionPKwhy isnt that possible, bitpuffin?
15:09:20OrionPKyou just have to make your query object at compile time
15:09:24BitPuffinbecause you can't know the names of the fields at compile time
15:09:43BitPuffinyeah well that's what I do ish
15:10:06OrionPKdoable w/ macro stuff
15:10:23BitPuffinmacros can't know what doesn't exist yet
15:10:49OrionPKdont know what you mean
15:10:56EXetoCyou can validate at run-time and throw if there's a mismatch
15:11:10BitPuffinwell I mean that a macro can't know about data that is outside of the program
15:11:20OrionPKwhy would it need to
15:11:26BitPuffinso it can't figure out that a database table has these rows or something
15:11:33OrionPKit would assume it does
15:11:34BitPuffinI guess you could do a delegator thing instead
15:11:55OrionPKa database schema should be fairly static, and probably change less often than your code
15:12:11OrionPKyou should get predictable schema for any given query
15:12:22OrionPKwith the columns you ask for
15:12:38EXetoCtype validation can be done for built in SQL types anyway. I'll mess about with that next week or something
15:12:40OrionPKif a column doesnt exist, thats an error
15:12:49BitPuffinwell I just mean knowing fiedl names
15:12:59OrionPKyou tell it what field names in the query
15:13:05OrionPKfield names = column names
15:13:30BitPuffintrue
15:13:31OrionPKquery(myQuery): "SELECT Field1, Field2, Field3 FROM TableA"
15:13:51BitPuffinthen it could parse the sql to figure out what it is
15:13:52OrionPKmyQuery gets compiled into a type and some procs
15:14:29EXetoCor query using libpq for example, which is much easier
15:14:53EXetoCwell, that'd be at run-time then
15:19:03EXetoCor would it? :p
15:19:10*[1]Endy joined #nimrod
15:19:31BitPuffinEXetoC: ye
15:28:37EXetoCit depends on the VM
15:29:32EXetoCAraq: didn't you say that you were able to execute SDL code at compile-time? what is not allowed? database access for example
15:48:19*easy_muffin joined #nimrod
16:01:54*easy_muffin quit ()
16:08:42*BitPuffin quit (Ping timeout: 252 seconds)
16:23:17*easy_muffin joined #nimrod
16:28:55*[2]Endy joined #nimrod
16:32:19*[1]Endy quit (Ping timeout: 252 seconds)
16:48:03*aftersha_ joined #nimrod
16:52:21*Mat3 joined #nimrod
16:52:23Mat3hi
16:54:15*aftersha_ quit (Quit: Computer has gone to sleep.)
16:56:31*Demos quit (Ping timeout: 246 seconds)
16:57:30*BitPuffin joined #nimrod
17:00:19*aftersha_ joined #nimrod
17:05:42*Demos joined #nimrod
17:20:28*faassen left #nimrod (#nimrod)
17:23:32BitPuffinEXetoC: hmm, I pass forwardCompat = true but still get this:
17:23:41BitPuffinlet glv = initGL_API(glv33, forwardCompat = true)
17:23:45BitPuffinwait
17:23:47BitPuffinlol
17:23:49BitPuffinhang on xD
17:24:01BitPuffinError: unhandled exception: NSGL: The targeted version of OS X only supports OpenGL 3.2 and later versions if they use the core profile [EGLFW]
17:24:12BitPuffinoh wait
17:24:18BitPuffinread the error message IdiotPuffin
17:24:49BitPuffinEXetoC: what's the way to make it core?
17:26:06EXetoCBitPuffin: by setting profile
17:26:23EXetoCto glpCore
17:26:39BitPuffinEXetoC: well yeah but hao
17:27:13EXetoCGL_API = initGL_API(version = bla, profile = glpCore)?
17:28:01BitPuffinEXetoC: yay
17:28:16BitPuffinEXetoC: yeah I figured out right before I read what you said xD
17:28:52EXetoC:>
17:29:00EXetoCdefault args that can be named<3
17:32:32EXetoCBitPuffin: is your nimrod build recent?
17:41:42*xenagi quit (Quit: Leaving)
17:42:18BitPuffinEXetoC: think so yeah
17:42:40BitPuffincan't remember arguments getting skipped working before
17:42:43BitPuffinmaybe they did
17:52:26*BitPuffin quit (Ping timeout: 264 seconds)
17:53:23*BitPuffin joined #nimrod
17:54:01EXetoCBitPuffin: what do you mean? these are default arguments
17:54:27BitPuffinEXetoC: well I mean skipping some parameters that already have a default value
17:55:32BitPuffinIf I'm not gonna inherit, is there any point in making it an object rather than a tuple?
17:55:55EXetoCyes, depending on if you want to encapsulate anything
17:56:10EXetoCBitPuffin: are you referring to the order of the parameters?
17:56:23EXetoCeither way, I'm pretty sure it has worked for a long time
17:56:46EXetoCif you can name them at the call site then it shouldn't matter
17:57:20BitPuffinEXetoC: yes
17:57:24BitPuffinEXetoC: what do you mean
17:57:29BitPuffinEXetoC: oh you mean method for example?
17:57:37BitPuffinI haven't used method once tbh
17:58:20EXetoCthe first thing I said was about objects and the following statements are related to default args
17:59:02EXetoCBitPuffin: you don't have to inherit when using objects, so encapsulation of individual fields is another use case
17:59:20*DAddYE joined #nimrod
17:59:26EXetoCyou asked if inheritance was the only use of objects
18:00:11EXetoCI guess another use is making constructions more verbose in that the field names have to be specified, but that's often hidden behind an init/new proc anyway
18:00:12BitPuffinEXetoC: well okay and if I don't want to hide any variables is the stuff
18:00:35BitPuffinEXetoC: I guess the question is, if I use only stuff that tuples can already do, isn't it better to just use a tuple?
18:02:19*Demos quit (Ping timeout: 272 seconds)
18:05:26*aftersha_ quit (Quit: Computer has gone to sleep.)
18:08:51*Demos joined #nimrod
18:09:02DemosI see a TNimrodTypeKind type in macros. How can I get my hands on something of that type. Looking at dumpTree I see that type annotations are just idents
18:09:48*bbodi_ joined #nimrod
18:10:16*bbodi quit ()
18:10:50*bbodi_ is now known as bbodi
18:12:04bbodihi all! I saw that parseopt module is deprecated and the new parseopt2 shoud be used insteadf of it. But the compiler modules still use the deprecated parseopt modules. why?
18:12:06EXetoCBitPuffin: not really imo
18:13:35EXetoCbbodi: they haven't had the opportunity to migrate yet I think
18:15:35bbodiI have a working branch where I replaced the module imports to parseopt2.. do you think that it would be valuable to push it up to github?
18:16:47BitPuffinEXetoC: elaboRATE
18:17:15dom96Dear Windows, why do you hate me? :(
18:17:24EXetoCBitPuffin: -not
18:17:38EXetoCthat doesn't make much sense, but you know what I meant :p
18:17:57EXetoCI mean I can't see why not a tuple should be preferred then
18:18:36BitPuffindom96: only because it sucks
18:18:52BitPuffinEXetoC: good boi
18:18:58BitPuffinEXetoC: so even when nesting?
18:19:20EXetoCbbodi: can't see why not if it behaves the same
18:19:23EXetoCBitPuffin: yeah
18:19:31BitPuffinEXetoC: fair enough
18:20:09BitPuffinI wonder what Araq think
18:21:17BitPuffinthere is more syntax in tuple though, guess that's why I did object
18:22:12Demosserious question: Why do we still use that terrabad loop syntax for processing command line args? The interface would be so much simpler if you just said "give me the value of this arg" and the library did so
18:22:32Demosheck I wrote a library that did that in c++ and it was nice
18:22:39EXetoCBitPuffin: when? it's anonymous and field names can be omitted
18:22:44Demosis it just getopt?
18:22:46EXetoCand the type can be aliases
18:23:40EXetoCDemos: ya https://github.com/docopt/docopt
18:23:58BitPuffinEXetoC: well I mean that you can't use indentation syntax
18:24:00EXetoC*aliased
18:24:03BitPuffinyou do[]
18:24:16EXetoCyou can
18:24:26DemosEXetoC: neat-o
18:24:31EXetoCsomeone enlightened me to that fact not long ago
18:26:07EXetoCBitPuffin: or maybe you mean when nesting. I haven't tried that
18:27:07Demosugh another compiler crash while doing macros....
18:27:49BitPuffinEXetoC: you can do indentation syntax instead of [] with tuples
18:27:51BitPuffin?
18:28:15EXetoCBitPuffin: yes http://build.nimrod-lang.org/docs/manual.html#tuples-and-object-types
18:29:02EXetoClater
18:29:08Mat3Demos: What do you want to do ?
18:29:10BitPuffinEXetoC: motherfucker
18:29:12BitPuffinthat's nice
18:29:37Demostake an AST and generate a string, also known as compileing the ast
18:30:21BitPuffineven works with nesting
18:30:23BitPuffinsuhweet
18:30:25Demosgetting Internal Error: GetUniqueType
18:32:43Mat3I'm sorry, ask Araq about this type of errors
18:32:51*CarpNet quit (Quit: Leaving)
18:33:06Demosyeah, trying to pair it down to a minimal test case
18:33:14Demosbut macros are supah buggy
18:33:28EXetoCsomeone got that yesterday or something. dunno if he reported it
18:34:19Demoshm, I got a segfault on using the quasi-quote stuff, and reported it
18:34:24EXetoCDemos: dont try too hard. he mostly just care if it compiles
18:34:42Demoshm?
18:35:19EXetoCto minimize the code
18:36:34Demosyeah, well I may learn something in the process of a minimal test case :D
18:36:55EXetoCthat should be documented somewhere, because I think that some people are used to devs who refuse to examine anything big
18:41:53*brson joined #nimrod
18:42:41Mat3Demos: Please take a breath and ask yourself if the use of macros is really 1. necessary, 2. efficient and 3. an elegant way of implementation for your problem
18:43:01DemosI am pretty sure it is
18:43:19OrionPKmacros are always the answer
18:43:37EXetoCindeed
18:43:48Mat3yeah, and BASIC is the solution, I know ;)
18:43:58Demoscan we not do the whole "use restraint with macros" now. I am trying to learn to use them and am fiddleing around with a macro that generates GLSL from a nimrod proc. I will probably never finish this macro but I will learn something
18:44:57EXetoCI'm not sure why it's useful, but interesting nevertheless
18:45:22OrionPKwhy wouldnt you compile to GLSL at compiletime if you could?
18:45:25OrionPKsilly mat3
18:45:38Mat3OrionPK: No, same logic
18:45:39EXetoCcompile even?
18:45:51EXetoCoh you mean stringify
18:46:16EXetoCjust guessing now
18:47:34OrionPKmy logic is; if it doesnt need to change during runtime, and it can just as easily be done at compile time, do it at compile time
18:48:11DemosOrionPK: the ability to compile GLSL to a blob is a very new extension that is not widely supported
18:48:15EXetoCyou want to generate binaries at compile-time?
18:48:26EXetoCright
18:48:49OrionPKdemos not really talking about compiling it down to binary
18:49:04OrionPKjust turning it into a GLSL string
18:49:42OrionPKyou wouldnt want to compile to a blob because diff hardware might do it differently, i would think
18:49:46EXetoCyou don't like inline strings that aren't highlighted?
18:50:15OrionPKwho says they're not highlighted https://dl.dropboxusercontent.com/u/417554/sublanguages.png
18:50:15EXetoCso you want to go from nimrod to GLSL code? I can't think of anything else really
18:50:26OrionPKthats what demos wants
18:51:00*BitPuffin quit (Ping timeout: 252 seconds)
18:51:32Demosif I were doing HLSL I could compile to a blob by staticExecin FXC, and put that blob into a const var.
18:51:39Demosstrings and binaries are the same here
18:52:15EXetoChow does that work? is it actually implemented?
18:53:30EXetoCthat was directed towards OrionPK
18:53:37OrionPKdoes what work
18:53:48OrionPKthe syntax highlighting?
18:53:49EXetoCthe highlighting
18:53:59OrionPKyes, w/ the sublime text plugin
18:54:11OrionPKand my template/annotations module
18:54:21*BitPuffin joined #nimrod
18:54:34EXetoCok
18:55:11Mat3OrionPK: Well, some time code-depth matters for example, in some ways just defining constants will do the same without less effort - it's depends on the problem
18:58:25*Demos quit (Ping timeout: 272 seconds)
18:58:52*OrionPK quit (Remote host closed the connection)
18:59:00*Mat3 thinking in most cases computing static expressions at runtime isn't relevant in terms of both code-size and performance
18:59:50Mat3anyhow off topic
19:00:29*OrionPK joined #nimrod
19:03:40*brson quit (Ping timeout: 265 seconds)
19:04:07*BitPuffin quit (Ping timeout: 272 seconds)
19:04:52*Mat3 is now known as Mat3-work
19:05:32*LordAndrew joined #nimrod
19:10:27Mat3-work^with
19:27:55*vendethiel quit (Ping timeout: 272 seconds)
19:30:57VarriountGood evening!
19:32:43*tdc joined #nimrod
19:33:03LordAndrewGood afternoon. :)
19:33:11reactormonkGood morning
19:34:43*filwit joined #nimrod
19:35:29filwitheya folks
19:37:10VarriountA wild filwit appeared!
19:37:26*Varriount throws a great ball at filwit!
19:38:23filwitfilwit uses run
19:38:32filwiti never played pokemon..
19:38:58*Trixar_za throws a Master Ball at Varriount
19:39:01filwitbut i have pretty much all day to work on Nimrod, so imma try and get a model from Blender rendering :)
19:39:20*Varriount eats the Master Ball
19:39:42VarriountHeya Trixar_za, haven't seen you in here before.
19:40:18Trixar_zaOh, I idle a lot and make nonsense comments when nobody is watching
19:40:18*nueva joined #nimrod
19:40:32Trixar_zaNice to see that the channel has grown in the last few years
19:40:55filwitbtw, someone on the forum wanted to know how to check for byte alignment of uint64 types in Nimrod. Anyone know the answer to that?
19:40:58Trixar_zaI still remember when there was only like 13 of us :P
19:41:47Varriount'byte alignment' in what context?
19:41:54nuevahi. can nimrod compiler output generated [C/C++] files' names (without generating files)?
19:41:57Araqhi nueva welcome
19:42:23filwitidk exactly. I didn't fully understand the question myself. Here's the forum post tho: http://forum.nimrod-lang.org/t/320/2
19:42:29filwit^ Varriount
19:42:34nuevai want to pass names of generated files to external build system
19:44:24reactormonknueva, unlikely. There's more than one file generated usually
19:44:25OrionPKisnt it just folder_file.c
19:44:26filwitaren't the generated C files the same names as the Nimrod modules?
19:45:19reactormonknueva, any problem with just reading the files back in?
19:46:53nuevareactormonk: build system requires generated files' names long before invoking compiler for real "compiling" to make build dependencies DAG
19:48:19Trixar_zaWhat does DAG mean?
19:48:50nuevaTrixar_za: direct acyclic graph, I suppose.
19:49:37Trixar_zaAh, the fourth one on the list. It was that or Data Analyst Group, but that didn't make sense.
19:49:52LordAndrewIs anyone here familiar with PEG ("Parsing expression grammar")? I was looking to do some regular expressions, but the re module suggests using the pegs module instead.
19:50:07LordAndrewExcept, I can't... find any sort of information or tutorials on how to even use PEG.
19:50:44VarriountLordAndrew: The peg module?
19:50:47nuevaTrixar_za: maybe you was right, because DAG isn't deciphered anything in manual :)
19:51:13Trixar_zahttp://nimrod-lang.org/pegs.html
19:51:17VarriountLordAndrew: The peg module has a pretty good explanation of PEG's and how to use them.
19:51:43*Mordecai joined #nimrod
19:52:06VarriountHi psquid
19:52:22filwitdom96: 61 users?
19:52:25nuevai think compiler can recursively scan main module dependencies, generate just output [intermediate source] file names and print them
19:52:36filwitdom96: what's the record at these days?
19:52:46Varriountfilwit: 62/63
19:52:54filwitdamn, so close
19:53:34*BitPuffin joined #nimrod
19:53:38*psquid quit (Disconnected by services)
19:53:42*Mordecai is now known as psquid
19:53:49dom96filwit: 63
19:53:51nuevabut it doesn't have similar option ATM. so the only way is to change compiler by myself? or am I missing something?
19:54:38*aftersha_ joined #nimrod
19:54:44*vbtt joined #nimrod
19:54:47filwitnueva, you'll probably have to ask Araq or Zahary, but they're probably busy at the moment
19:55:03Varriountnueva: I believe that there might be ways to go around such things at the moment
19:55:26VarriountBut nothing precisely as what you want.
19:55:36Araqnueva: you can make the compiler generate a build script
19:55:44Araqand extract the C filenames from that
19:56:07nuevaOrionPK: yes it's pretty easy to find module name, but it's hard to find module's dependencies name (including standard library ones) without parsing sources. so I think compiler can do that.
19:56:22OrionPKthis is true
19:56:37*Lordovos joined #nimrod
19:56:42nuevaAraq: fine idea. I'll try it now.
19:56:55Araqthere is also the option --genmapping
19:56:58filwitwait.. what about Nimrod genDepend ?
19:57:07Varriountnueva: You could also invoke the nimrod compiler with genDepend
19:57:13Araqthe compiler then generates a "mapping file" that also has the C files in it
19:57:14Lordovos"Disconnected (Connection reset by peer)" what the heck does this mean
19:57:38*vendethiel joined #nimrod
19:57:54Trixar_zaThe server killed your connection for the client not responding fast enough to the ping ping event
19:57:57filwitdom96: 65 users!!!
19:58:06filwitPARTY TIME
19:58:11dom96Trixar_za: no, that's ping timeout.
19:58:13Trixar_zas/for/because/
19:58:31Trixar_zaOh, then the server just killed your connection
19:58:46VarriountLordAndrew: http://stackoverflow.com/questions/1434451/what-does-connection-reset-by-peer-mean
19:58:58AraqVarriount, filwit gendepend doesn't generate this information
19:59:03dom96Lordovos: Something went wrong with your connection or Freenode's internet connection.
19:59:09Trixar_zaEfneth as a whole list on it
19:59:14Trixar_zaEFNet*
19:59:21Araqbut niminst itself uses --genmapping so that's the proper way to do it
19:59:55VarriountAraq: You would just have to transform the actual file names into the c file names
20:00:08Araqthe compiler then generates mapping.txt which is in .ini file format
20:00:13*LordAndrew quit (Ping timeout: 272 seconds)
20:00:25AraqVarriount: right ... "just"
20:00:31Varriount:3
20:00:38*Lordovos is now known as LordAndrew
20:00:40Araqeven though it's not that simple and might change any time
20:01:17Trixar_zaEither way, it's something that happens on IRC, so don't worry about it
20:01:19reactormonknueva, I'd make nimrod create a compile script and invoke that from your build system
20:01:50LordAndrewTrixar_za: Alrighty.
20:02:14*Mat3-work is now known as Mat3
20:02:28VarriountLordAndrew: FYI, if your nick is registered with Freenode, you can use '/ns ghost <name>' (if you're identified) or '/ns ghost <name> <passord>' if you're not.
20:02:33Trixar_zaSpeaking of IRC - I have a network to break and fix
20:02:33Trixar_za:P
20:03:07VarriountIf it isn't regsitered, I highly recommend registering it before someone takes it. Plus, then people can send you memos.
20:03:15Varriount*registered
20:05:52xtagonWhat does "internal error: too implement nkObjDownConv
20:05:52xtagon" mean?
20:06:28xtagonI've got a proc, and if you use it to assign a var it works, but it won't work for a const.
20:06:46xtagonhttps://gist.github.com/xtagon/167f358d8c0abc20d07f
20:07:41Varriountxtagon: Sounds like something that is planned to be implemented, but isn't actually implemented yet.
20:08:46Varriount'nk
20:08:48Trixar_zaIs Japan part of the EU?
20:09:05Varriount'nk' usually means 'node kind', as in an ast node or something
20:10:03Varriountxtagon: What happens if you shift the syntax to 'toSemVer("1.23.4")'
20:10:35Araqxtagon: looks like another vmgen bug to me
20:10:36xtagonVarriount, tried that, no change
20:11:38*aruniiird joined #nimrod
20:11:50Araqhi aruniiird welcome
20:12:28Mat3hi aruniiird
20:12:34Varriountxtagon: Changing the 'const' to 'let'?
20:12:56Araqxtagon: 'master' should compile it, 'devel' doesn't
20:12:56*zahary joined #nimrod
20:13:06xtagonVarriount, let works fine
20:13:22Araqdom96: 66!
20:13:43dom96Awesome :D
20:14:15zaharywow, that's big jump. is the dr dobbs article out or something?
20:14:38Mat3that would be nice
20:14:50*[1]Endy joined #nimrod
20:14:51nuevaunfortunately, it looks like genMapping and genScript works only with compile* commands, which is kinda ruins the point. genDepend expects dot tool to be available (though it doesn't fail without it) and doesn't include stdlib modules. genMapping is pretty close to what I need BTW.
20:15:05dom96I wouldn't call it 'big' yet.
20:16:34filwit67 now
20:16:42filwitor is one of those redundant?
20:17:00filwitah, Nimbot doesn't count, gottit
20:17:27*[2]Endy quit (Ping timeout: 260 seconds)
20:18:47Araqnueva: I can't follow, yes you have to compile your nimrod code so the compiler can tell you how the C files are named ...
20:19:09dom96nah, we count doubles :P
20:19:13Araqhow else should it work?
20:19:20dom96and bots
20:19:32Araqfilwit: we consider nimbot a (female) human being ...
20:19:39AraqXD
20:19:39filwit^ lol
20:19:57Trixar_zaFull of problems with a tendency not to tell you what's wrong? Oo
20:20:21VarriountAraq: Should "IRune" in unicode.nim be a native int? Shouldn't it be an int32?
20:20:30filwitwell i'm glad i was finally around to see a new record reached
20:20:59filwitby the end of 2014 we'll probably be at 80-90
20:21:47*BitPuffin quit (Ping timeout: 252 seconds)
20:22:52dom96By the end of 2014 we'll be at 500
20:23:24dom96ok, maybe that's over ambitious.
20:23:36nuevaAraq: yes, I have to. but in preliminary "compilation" I don't need generated sources' text at all. I only need sources' paths. I know input (main module) and can feed it to build system. but I don't know real outputs to feed to build system so that these outputs will be passed to C compiler.
20:23:40dom96But 1.0 should be out by the end of 2014
20:24:03*BitPuffin joined #nimrod
20:24:15AraqVarriount: who cares? unicode code-points are 21bits or something. so what makes int32 more correct than int?
20:24:19filwithmm... i'll have a limited but functioning game engine out in 2014 too, so you never know
20:24:42filwitwe'll have some stuff to advertise and write articles about
20:26:18xtagonfilwit, is your game engine Hymn?
20:26:22nuevaAraq: I want to use Nimrod compiler only as intermediate files generator. all real work on compiling C sources will be done by other build system. but I don't know exactly which files will be generated.
20:26:34filwitxtagon: that's it's codename, yes
20:26:48xtagonfilwit, I'm the guy who e-mailed you the other day asking if it was going to be open source :)
20:27:03filwitah :) nice to know who you are on the IRC
20:27:08EXetoCdom96: <500 = failure :/
20:27:39Araqnueva: well you can extract the C filenames once and pretend they are static as long as your nimrod code doesn't import new modules
20:31:06nuevaAraq: yeah, it looks like the best way for now. I just thought I've missed some existing option, so decided to ask.
20:32:52Araqnueva: I still don't get it. do you use --compileOnly and then your build system?
20:33:27nuevaAraq: yes, exactly
20:33:41*BitPuffin quit (Ping timeout: 272 seconds)
20:34:25Araqaha, so you want --genmapping to work with --compileOnly
20:34:39Araqok, added it to my todo
20:36:34nuevaAraq: --genMapping works with --compileOnly. I want option to just scan dependencies of module and then print output file names (without generating/saving files' text).
20:38:08*BitPuffin joined #nimrod
20:38:30*brson joined #nimrod
20:38:38nuevaAraq: I mean "_recursively_ scan" and "print _all_ output files's names"
20:39:24*[2]Endy joined #nimrod
20:40:38*brson quit (Client Quit)
20:43:00Araqnueva: ok, so "nimrod check" + --genMapping
20:43:49*[1]Endy quit (Ping timeout: 272 seconds)
20:50:26*io2 joined #nimrod
20:50:41nuevaAraq: --genMapping doesn't worh with check command.
20:50:57AraqI know
20:51:05Araqbut that's what you want, right?
20:56:00*easy_muffin quit ()
21:00:25*[2]Endy quit (Ping timeout: 245 seconds)
21:00:40*brson joined #nimrod
21:00:51nuevaAraq: pretty close, but what I really want is http://pastebin.com/GXK61sTt If mapping.txt would be possible to print to stdout and check would be possible to make silently (I don't want errors info) it would be fine too.
21:01:38Araqnueva: awaiting your compiler patch ;-)
21:01:50LordAndrewHmm. Do the executables produced by compiling .nim code with Nimrod have any sort of external dependencies and/or licensing obligations?
21:02:13*brson quit (Client Quit)
21:02:28*brson joined #nimrod
21:02:40AraqLordAndrew: yeah, if you run the binary in production, you need to pay me $100,000 ;-)
21:03:16Araq--verbosity:2 prints external dependencies
21:03:16nuevaAraq: will (possibly) do when generated sources list will grow too much :)
21:03:36OrionPK$100,000? what a steal
21:04:27BitPuffinhmm
21:04:28BitPuffinwtf
21:04:44BitPuffin] expected: https://gist.github.com/BitPuffin/9ab658d8538f74e4b994
21:04:56BitPuffinon the line with vertices
21:04:58BitPuffinI don't see it
21:04:59BitPuffin:(
21:05:09BitPuffinor wait
21:05:10BitPuffinhang own
21:05:29filwiti was reading how Linus Torvalds doesn't like C++ the other day, and made me think that Nimrod would actually be a language the guy would like as a "successor" to C
21:05:37BitPuffinnope
21:05:40BitPuffindon't see it :(
21:05:49vbttfilwit: with a gc?
21:05:54filwitgood point
21:06:01BitPuffinoptional gc
21:06:05filwitnot really
21:06:08OrionPKlinus torvalds doesnt like anything or anyone
21:06:09BitPuffinya rly
21:06:19BitPuffinSometimes I tend to not use GC
21:06:20vbttand inheritance?
21:06:22BitPuffincuz I'm a freak
21:06:28BitPuffinvbtt: optional inheritance
21:06:40filwitit actually works without GC? i thought Araq said that wasn't really possible..
21:06:57vbttok, but i dont think nimrod should target to linus, specifically
21:07:21BitPuffinfilwit: yarly
21:07:21vbttfilwit: it works if you do manual memory management, apparently. so no refs, only ptrs.
21:07:40BitPuffinwell yeah obviously
21:07:45BitPuffinwhat else?
21:07:49filwitwell i was thinking if we could only get Linus to endorse Nimrod, then we could get the Linux Foundation to fork out some funding
21:07:52filwitLOL
21:07:57BitPuffinIf you don't GC you need to manage memory
21:07:57filwit(just kidding)
21:08:30Araqfilwit: I don't think Linus would like Nimrod
21:08:38BitPuffinguys wtf, why doesn't the tuple work
21:08:40filwitBitPuffing: yeah, i've never tired, but I asked before and got a "not really possible" response
21:08:46filwitBitPuffin**
21:08:59filwitAraq: why not?
21:09:04BitPuffinfilwit: not really as pleasant as GC nimrod all the time is what I would say
21:10:10LordAndrewHuh. In the .c files in the nimcache, they have "/* The generated code is subject to the original license. */" appended to the top. What is the "original license" this refers to?
21:10:14*bbodi quit (Ping timeout: 272 seconds)
21:10:21filwitAraq: based on his complaints about C++, it sounded like he really just doesn't like OOP
21:10:32AraqLordAndrew: the license you chose for your code
21:10:52Mat3ciao
21:11:08*Mat3 quit (Quit: Verlassend)
21:12:39Araqfilwit: Linus decided to build a Unix clone, so in my alternative reality this means he wouldn't recognize good design even if you nail it onto his forehead
21:13:50filwitwell there where obviously practical benefits to making a Unix clone beyond the technical stuff
21:14:09filwitPOSIX standard and all that
21:14:44BitPuffinhmm
21:14:52BitPuffinshouldn't it be possible to compare a ref array with nil?
21:14:54nuevai suppose nimbase.h could change in future compiler versions, so I shouldn't embed it in my project to use with generated files. is it true?
21:14:55filwitif it didn't conform to POSIX, it would probably only be as popular as ReactOS right now...
21:15:00BitPuffinI'm getting this instead
21:15:10BitPuffinError: type mismatch: got (array[0..999999, TVec3], nil)
21:15:11BitPuffinbut expected one of:
21:15:15BitPuffin<long list>
21:16:26*brson quit (Ping timeout: 264 seconds)
21:17:55Araqnueva: not sure, nimbase.h changes are rare
21:18:05BitPuffinhttps://gist.github.com/BitPuffin/8567509
21:18:08BitPuffinthat's the code
21:18:16nuevawhy is git repo is so huge? because it contained c sources in past? or any binary files?
21:18:38BitPuffinnueva: binary
21:19:01AraqBitPuffin: does it work on "master"?
21:19:12BitPuffinAraq: I think I might have master let me check
21:19:27Araqnueva: C sources as zips for bootstrapping convenience
21:19:38BitPuffinAlready up-to-date.
21:19:47LordAndrewWould there be any use for something like this: https://gist.github.com/Lordovos/8552530 ?
21:19:57Araqdoes it work on "devel", BitPuffin ?
21:20:03BitPuffinAraq: que?
21:20:42AraqBitPuffin: we have 2 branches now. "devel" is unstable, "master" is supposed to be stable
21:20:48BitPuffinI see
21:20:50BitPuffinthat's good
21:21:41BitPuffinI just did git checkout remote/origin/devel or something like that, hope that's the correct way
21:22:08BitPuffinSIGSEGV: Illegal storage access. (Attempt to read from nil?)
21:22:10BitPuffinftw
21:22:20BitPuffinAraq: that would be a nein
21:23:21filwitgit checkout origin/devel
21:23:35filwitunless your working off your own fork
21:23:37BitPuffinfilwit: well I assume it worked since the error was something else
21:23:43filwitah, okay
21:23:54*odc quit (Ping timeout: 252 seconds)
21:24:46filwitps. you'll need to 'git checkout master' before 'git pull', in case you didn't know
21:25:23BitPuffinwell I was already on master
21:25:36filwiti meant the next time you try and pull
21:25:40BitPuffinwtf now I can't build the master version because the devel version was broken
21:26:02filwityou'll get a merge conflict of something if you're not on master when trying to pull
21:26:43AraqBitPuffin: a known issue, modify ropes.nim, the line with expr[string]
21:27:02BitPuffinAraq: why isn't that committed already then?
21:27:06Araqmake `~ ` to use the trival implementation
21:27:08filwitor 'git reset --hard'
21:27:26filwitthen build master again
21:27:38AraqBitPuffin: because I have no time and nobody else here is doing anything productive
21:28:00BitPuffinAraq: well I'll deal with it when I get home then
21:28:09Araqthank you
21:28:18BitPuffinAraq: I'll PR dat shit
21:29:34nueva"import some/a" and "import some/some/a as b" will result in overwrited generated files ("nimcache/some_a.c"). is it bug or unexpected edge case?
21:29:59*tdc quit (Ping timeout: 240 seconds)
21:30:19Araqit's an expected edge case
21:30:40Araqthe compiler uses the "package" name except that we have no notion of a "package" really
21:31:05AraqIMHO you get what you ordererd, a mess
21:33:43*BitPuffin quit (Ping timeout: 252 seconds)
21:36:05nuevaAraq: yes, I've ordered a messed hierarchy, but not overwrited files. anyway, I can't really object you, because I can't think about a real similar example.
21:36:36*aftersha_ quit (Quit: Computer has gone to sleep.)
21:38:12Araqnueva: if the compiler would encode the full path, you couldn't move the nimcache directory around
21:38:40AraqI can't win the battle against increasing stupidity
21:40:06*vbtt_ joined #nimrod
21:40:25vbtt_Araq: nimrod could complain about the conflict.
21:41:02Araqvbtt_: perhaps
21:41:15vbtt_basically reject the mess.
21:42:41Araqbut "omg nimrod fails when you have 2 identifcally named modules of different subdirectories which however have the same name" is not really an issue I care about
21:43:19vbtt_fair enough
21:44:34Araqyou might as well complain that the compiler doesn't make you an omelette yet
21:45:29xtagonfrom breakfast import omelette
21:45:43EXetoCso imports should be renamed then? because you can't control that when using third-party libs
21:45:46*brson joined #nimrod
21:45:46*brson quit (Client Quit)
21:45:52EXetoCif that's even relevant
21:47:00nuevawell, Nimrod doesn't even care about its own output designed for feeding the compiler, what omelette will it then cook for feeding a human?
21:48:33AraqEXetoC: third-party libs usually adhere to babel's guidelines and so it shouldn't be a problem
21:49:22Araqif you have 2 different packages of the same name you already have path problems because the OS is stupid enough to enforce unique directory names ...
21:50:45Araqit's not like the compiler picks "source" as the package name when you have pgk/source/module.nim
21:51:15Araqit tries to be smart ... (yeah I know that usually ends in a desaster)
21:52:25nuevaAraq: is it relevant for my artificial example? subdirectory can have the same name as its parent directory (or any other module's parent directory) so uniquiness constrant doesn't apply here.
21:54:47Araqnueva: it's relevant for the real world. artificial examples are cheap and meaningless
22:00:16VarriountAraq: I would use int32 because it uses less memory?
22:01:27AraqVarriount: ok ... a valid reason. so you store a seq[TRune] instead of an utf-8 string and care about memory usage
22:01:49AraqVarriount: so fix it if it concerns you
22:02:14VarriountI will. I was just wondering if you had a specific reason for implementing it as a native int.
22:02:59nuevaAraq: nimbase.h is missing in nimcache and compile_*.sh script is placed outside of nimcache, so compiling of cached files on other computer isn't so obvious ATM. just nitpicking.
22:03:16NimBotAraq/Nimrod devel 749f920 Zahary Karadjov [+0 ±1 -0]: nest PreMain inside NimMain for easier consumption of static libraries developed in Nimrod... 2 more lines
22:03:16NimBotAraq/Nimrod devel 0317937 Zahary Karadjov [+0 ±3 -0]: fix the error "only proc headers can feature pragmas" when compiling in JS mode
22:03:31Araqnueva: it used to work
22:04:01Araqbut we have constantly have to change things because people constantly complain
22:04:10xtagonDoes anyone use the experimental JS mode? I find it interesting but have a hard time seeing practical use cases
22:04:30Araqreactormonk uses it
22:04:56VarriountAlthough, if you wanted to be really conservative, you could probably do something with a tuple (int16, int8)
22:05:18VarriountThat would probably send Araq into paroxisms though.
22:05:19AraqVarriount: that doesn't change anything because of alignment
22:05:25reactormonkxtagon, kinda works
22:05:45reactormonkxtagon, https://github.com/Araq/Nimrod/issues?labels=JS&page=1&state=open
22:06:07reactormonkmostly https://github.com/Araq/Nimrod/issues/347
22:06:36reactormonkmy head just exploded because of a nasty case of JS userscript sandbox breaking :-/
22:07:50xtagonI'm mainly wondering *why* you would want to use the JS compiler. Is it just to have a nicer syntax, as with CoffeeScript?
22:08:20nuevaxtagon: maybe because of unified language on backend/frontend
22:08:22filwitso you can write an app and target native and web
22:08:53xtagonAh
22:09:12EXetoCand language features of course
22:09:31nuevanode.js made this for JavaScript but Nimrod is kinda meta-Node.js. with static typing and stuff.
22:09:37VarriountAraq: Since I'm not that knowledgable on alignment, could you explain? I thought that, at least on 32 bit systems, alignment was done in 4-byte chunks
22:10:43Araqyeah so what do you think your 3-byte tuple will take?
22:11:24Araqthat's right, it will get size = 4 for all practical purposes
22:11:25VarriountAh. Once again I get bits and bytes confused >_<
22:14:01*Smaehtin joined #nimrod
22:17:04VarriountHi Smaehtin
22:17:19SmaehtinHey everyone, Nimrod noob here. Why can I not evaluate a size of a given type at compile-time?
22:17:34SmaehtinExcept for the built-in types like int, long, etc.?
22:17:35VarriountSmaehtin: Can we see an example?
22:18:04VarriountAlso, what version of nimrod are you using, the version on the website, the master branch, or the dev branch?
22:19:11Smaehtinhttp://pastebin.com/HMskUn2Z
22:19:22SmaehtinI tried both master and the 0.9.2 version from the website
22:19:59AraqSmaehtin: because the size computation is still buggy
22:20:12Araqand so to prevent bugs, it's not allowed for now
22:20:33SmaehtinAraq: Okay, I see. Thanks a lot :)
22:20:48VarriountSmaehtin: Any particular reason why you need static size computation?
22:21:37EXetoCit should be "static" either way, no?
22:21:41SmaehtinBut the sizeof works fine at run-time, that seems weird
22:22:40VarriountSmaehtin: It probably has to do with the fact that static blocks run in the VM
22:22:43SmaehtinNo particular reason, I can easily work around the bug, but I just stumbled apon the bug
22:23:01*LordAndrew quit (Ping timeout: 248 seconds)
22:23:18VarriountFor the basic types, sizes are hardcoded (I think)
22:23:23SmaehtinVarriount: I see, I wasn't actually aware that the static stuff was executed in a VM, haha
22:24:02VarriountSmaehtin: Static code, templates, macros, etc are all calculated by an internal vm
22:24:40SmaehtinVarrount: Oh alright, thanks! :)
22:28:10SmaehtinAnother question: How are the plans going with the whole "making Nimrod case-sensitive" project? Or was that abandoned?
22:29:57AraqSmaehtin: it's not weird the compiler compiles 'sizeof' into C's sizeof
22:30:41VarriountSmaehtin: I think (I might be wrong) that Araq plans to have some sort of semi-case-sensitive mode. The problem right now is mainly the wrappers, I think
22:30:59SmaehtinAraq: No, I just realized that wasn't a very smart observation. My bad
22:31:00AraqSmaehtin: the compiler itself is now case consistent and you can use --cs:partial to get the partial case sensitivity we discussed on the forum
22:31:22SmaehtinAraq: Oh, also in the 0.9.2 version? Or master only?
22:31:29Araqmost parts of the stdlib should work now with --cs:partial too
22:31:38Araqbut it's in devel only
22:31:48SmaehtinAraq: Ah okay, that's nice. Thanks
22:32:41Araqsince you're one who wants that feature, let me ask you: is --cs:partial sufficient or do you want --cs:full ?
22:33:05*Araq is still gathering data
22:33:37VarriountIs there an explanation of what is partial about cs:partial anywhere?
22:33:48nuevais current styleguide still promotes identifiers like T* and P* or style is changed to TypeName and TypeNameRef (or similar)? I have nothing against any of these (or any other) style, just want to know about current internal codestyle...
22:34:00SmaehtinAraq: I'm not sure exactly what the differences are
22:34:31*psquid quit (Quit: WeeChat 0.4.2)
22:34:34Araqah ok, well --cs:parital distinguishes between Foo and foo but foo_bar is still the same as fooBar
22:34:55VarriountAh, so that wrappers still work.
22:34:56Araqin other words case is significant for the first letter only
22:35:20EXetoCnueva: yes. stuff would collide otherwise
22:35:23SmaehtinAraq: I personally prefer --cs:full then, haha
22:36:17VarriountI'd prefer something like --cs:full, but have it act like cs:none if a _ is in the identifier (Again, for wrappers)
22:36:22*vbtt_ quit (Ping timeout: 272 seconds)
22:36:43VarriountThen again, I don't feel very strongly about things either way.
22:36:51Araqnueva: I don't know how the transition from TTyp to Typ should happen
22:36:58*psquid joined #nimrod
22:36:58*psquid quit (Changing host)
22:36:58*psquid joined #nimrod
22:37:13Araqtechnically it's pretty easy to do automatically
22:37:40SmaehtinI honestly like the Pascal type prefixes
22:38:06AraqSmaehtin: you do? then why do you want --cs:full, lol
22:38:34EXetoCI'd be fine with having both, why not :p
22:39:07VarriountAraq: If there's one thing reading those PHP rants taught me, it's that things, at least in a stdlib, should be consistant.
22:39:11SmaehtinAraq: I would prefer everything being case sensitive but still keeping the Pascal type prefixes
22:39:31AraqSmaehtin: yay ... that's a new opinion
22:39:38Araqbrb
22:39:40SmaehtinHaha
22:40:00EXetoCI'd probably want Type and PType then or something like that
22:40:15*brson joined #nimrod
22:41:07SmaehtinEXetoC: Yeah that could work for me as well if it was of course still case-sensitive
22:41:08dom96Looks like no matter what we do we will make somebody unhappy.
22:41:49EXetoCSmaehtin: I don't know why but ok
22:42:01Smaehtindom96: That's stating the obvious, haha. Can't make everyone happy no matter what
22:42:08nuevais PType (by convention) just a shorter synonym for 'ref Type' or it's better also in some other sense?
22:42:22EXetoCor ptr Type
22:42:27VarriountI suggest we stick each option on a dart-board, blindfold Araq, and have him throw a dart and the one we should choose.
22:42:45SmaehtinVarriount: That would be the most fair thing to do
22:42:49Varriount*to pick the one
22:43:58SmaehtinDoes anyone know why the PayPal donation link isn't working on the site?
22:44:22nuevajust make something like gofmt for automatic formatting. automatically enforced common denominator is a bliss.
22:44:24SmaehtinOops, nevermind, works fine now
22:44:46Varriountnueva: I agree with you there. *hugs pylint*
22:45:13nuevaeven if it's TType, PType and some other ugly mess :D
22:50:25EXetoCnueva: does it format everything?
22:52:47AraqSmaehtin: I still think case sensitivity is one of the biggest mistakes in the history of computing fwiw
22:53:36Araqif it works at all then only because auto-complete ignores the case when you type stuff in ...
22:54:15nuevaEXetoC: do you mean "does it fail on some syntax constructs"? I beleive no, not on any.
22:54:55Araqin fact, even --cs:partial is slightly annoying
22:55:22Araqok, so it's cstring because it's a builtin type like int, but is it cstringArray or CstringArray?
22:55:43EXetoCnueva: no, it could just skip some elements. for example, sometimes having an if/else on a single line is readable and sometimes it makes sense to use 4 lines
22:55:47SmaehtinAraq: It may be, but for some reason my OCD really kicks in when I'm reading the Nimrod documentation and see all the different casing conventions like readBuffer, ReadBytes, E_Base, EAsync, etc. :(
22:56:07EXetoCor some might prefer 2, but I prefer to go with either of the extremes
22:56:19Araqis it WideCString or wideCstring or widecstring ?
22:56:49dom96You just need to be consistent.
22:56:54EXetoCwideC_string of course. pretty logical imo :p
22:57:03Araqand if it is WideCString do you really want a constructor proc wideCString ?
22:57:29dom96And then it's much easier to predict these names.
22:57:29EXetoCnot a fan of ctors that are named the same as the type?
22:57:30SmaehtinAraq: Yeah I see what you mean. Even Microsoft is inconsistent a lot of places when it comes to the .NET framework naming conventions
22:57:39reactormonkxtagon, and because javascript semantics suck.
22:57:54SmaehtinYeah, consistency is really the key here I think
22:57:55reactormonkjs> [100,1,2].sort()
22:57:57reactormonk[1, 100, 2]
22:58:39AraqSmaehtin: I disagree. consistency is only important because you have been trained to think so in decades of computing
22:58:51dom96The only problem with consistency is that it is difficult to achieve. But if we have something like go fmt it shouldn't be a problem right?
22:58:58VarriountAraq: Have you seen PHP?
22:59:14SmaehtinAraq: Perhaps you're right. I'm not really the kind of person who loves changes :)
22:59:18AraqI cna wirte lkie tihs and yuo cna slitl raed it
22:59:27SmaehtinAraq: Wow
22:59:32Varriount^ But not as easily
22:59:51nuevaEXetoC: it has -r="": rewrite rule (e.g., 'a[b:len(a)] -> a[b:]') and also has indent width setting and tabs/spaces indent switch. otherwise rules are fixed.
23:00:09nuevawide_c_string
23:00:31nuevaof types wide_c_string_t or wide_c_string_p
23:00:39VarriountWait, why are we arguing/discussing this again?
23:00:56EXetoCbecause someone mentioned it!
23:01:12AraqVarriount: because it's fun
23:01:12SmaehtinI'm sorry, I think it's because I asked what the status was on the --cs compiler option
23:01:15nuevawho let the dogs out?
23:01:18EXetoCnueva: C should be uppercase imo :>
23:02:01Araqdom96: it was easy to predict the names
23:02:18Araqit's just that the prefixes are admittedly somewhat ugly
23:02:39Araqand that's an issue when you confuse beauty with readability
23:03:09*aruniiird quit (Ping timeout: 272 seconds)
23:03:22VarriountWell, if we're all going to throw our opinions in the pot... I've always liked python's choice of using different styles for class names and procedure names.
23:03:44AraqVarriount: that's just hungarian notation
23:03:50EXetoCwide_C_string TCP_IP_ohai fooBar. this won't work with the upcoming changes though
23:04:05*brson quit (Ping timeout: 248 seconds)
23:04:31VarriountAraq: Do you have anything bad to say about hungarian notation then? I'm interested.
23:04:49EXetoCI like the sensible version
23:04:49Araqit's universally considered to be a bad idea :P
23:04:53EXetoCwhichever that was
23:05:15EXetoCboth?
23:05:22AraqVarriount: if this_is_easier_to_read thanThis why use both?
23:05:55VarriountTo distinguish between types and procedures
23:06:04EXetoCsystems hungarian is obviously stupid
23:06:32VarriountAlso, notice that I said 'different styles' - I meant the difference itself, not the two styles.
23:08:39Araqwhat do variables look like? this_style?
23:08:56VarriountIn python? Yes.
23:09:24dom96We're pretty far down the graph: http://sogrady-media.redmonk.com/sogrady/files/2014/01/lang-rank-114-wm.png
23:09:30Araqok, so it's important to distinguish between classes and defs but not between vars and defs because ... ?
23:10:02EXetoCcus call syntax? dunno
23:10:25EXetoCdom96: how can it be :>
23:10:29Araqdom96: but we ARE in the graph ...
23:10:32Smaehtindom96: How long has Nimrod been around for?
23:11:15*brson joined #nimrod
23:11:29dom96EXetoC: Because not enough Nimrod repos on github!
23:11:37dom96Araq: True.
23:11:56VarriountAraq: Because the first usage of a var tends to be in the middle of a proc
23:12:00dom96Smaehtin: Better ask Araq that.
23:12:12nuevamaybe because vars and defs are the same? 'def a: return 5' is equivalent to 'a = lambda: 5'
23:12:22Varriount^ That too
23:12:29SmaehtinAraq: How long has Nimrod been around (to the public)?
23:12:34AraqSmaehtin: since forever
23:12:57Araqcan't remember, need to check the site, lol
23:13:24SmaehtinAraq: There isn't even a Wikipedia page about Nimrod!
23:13:36VarriountSmaehtin: it got taken down
23:13:44SmaehtinVarrount: How come?
23:13:50VarriountDue to lack of third party sources
23:13:53dom96Smaehtin: We're not "notable" enough.
23:14:17SmaehtinVarriount: That's a shame. I really feel like Nimrod deserves a lot more attention than currently given
23:14:34renesachow can I iterate over the fields of a tuple while changing its values?
23:14:42renesaclike:
23:14:43renesacfor var c in min.fields:
23:14:43renesac c += 1
23:15:03nuevabtw, here is my usecase for Nimrod. have a C++ library, doesn't want to write in C++, want a language with interoperabilty with C++, but not C
23:15:12Araqfor c in min.fields: c += 1 # should work
23:15:24VarriountSmaehtin: Which is why, despite the fact that there are plenty of other languages, I choose to work on nimrod.
23:15:30Araqthe fields iterator acutally returns by 'var T'
23:15:48Araq(that's a secret)
23:15:59renesacI get Error: for a 'var' type a variable needs to be passed
23:16:21Smaehtinrenesac: remove the var keyword
23:16:23*brson quit (Ping timeout: 245 seconds)
23:16:29renesacI removed
23:16:39EXetoCfrom the param?
23:16:53EXetoCvar on param means you must pass in a var
23:17:00renesacif I didn't I would get: Error: identifier expected, but found 'keyword var'
23:17:07VarriountNot only are my meager talents of some use, but I get to use a language that isn't restricting (java) simple (C) or overly complicated (c++)
23:17:28EXetoCoops, didn't read properly
23:18:08Araqrenesac: hmm, I am quite sure this worked before
23:18:23renesacoops
23:18:25Araqtry perhaps: for x in fields(a): x = x + 3
23:18:29renesacmy fault
23:18:37renesacI declared min with "let"
23:18:40renesacsorry
23:18:49Araqgood
23:19:09dom96Personally I don't see myself contributing to anything big like Go or probably even Rust. Here we have a nice small community and there are plenty of opportunities to implement things which are great learning experiences and also help the language.
23:19:11renesacthe docs on .fields have: "The current implementation also has a bug that affects symbol binding in the loop body."
23:19:28SmaehtinVarriount: Yeah, Nimrod really seems to have hit the perfect spot when it comes to performance, simplicity, etc.
23:20:11renesacit is only a problem when creating a new variable inside the loop body?
23:20:17VarriountSmaehtin: I'll never understand why C++ types hate garbage collection so.
23:21:51EXetoCI hated garbage collection before because I trusted the opinions of other C++ programmers
23:21:54SmaehtinVarriount: Yet they still use smart pointers everywhere
23:23:31discolodamany associate GC with scripting languages
23:23:31SmaehtinVarriount: I mean, a lot of the C++ lovers always talk about how bad a GC is even though they're effectively using a GC themselves in the form of smart pointers and whatnot
23:24:23Smaehtindiscoloda: Yes, and bad performance too
23:24:40EXetoCbut at least some probably based their opinions on languages that don't give you many options
23:26:40renesacthis rant gives iOS devs view on garbage collection: http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/
23:26:57renesac(it is way down the post, the start is more a rant against scripting languages)
23:27:51renesacsearch for "All about garbage collectors"
23:29:46vbttgc has a bad rap because of the pauses, and secondly extra cpu usage
23:31:29*darkf joined #nimrod
23:32:13renesacwhat he is mainly concerned is controling the workspace of the app, so it can do heavier tasks w/o being killed by the OS
23:32:29Smaehtinrenesac: Interesting article :)
23:32:37Araqthat blog post has been debunked by now, I think
23:32:45*ddl_smurf quit (Quit: ddl_smurf)
23:32:57*brson joined #nimrod
23:33:00renesacdo you have a link?
23:33:20AraqI think the reddit discussion was quite good
23:33:53vbttnimrod lets you control the pauses so it's basically eliminated the 1st issue
23:34:45Araqmost power consumption for a smart phone comes from the display, not from how ARM runs Javascript code
23:35:10Araqetc. etc. he picks some JS benchmarks and concludes from them what he wants
23:35:19Araqno facts, no data
23:35:55EXetoCsuch a big post, but no facts? lovely
23:36:05*io2 quit (Ping timeout: 248 seconds)
23:38:37*brson quit (Ping timeout: 272 seconds)
23:41:19SmaehtinWhat parts of Nimrod actually rely on the GC? I know that built-ins like arrays in D rely on the GC, but I'm not sure about Nimrod.
23:43:02AraqSmaehtin: use the devel branch, compile with --gc:none and the compiler tells you
23:43:30Araqstrings, seqs, refs and closures use the GC
23:43:47Araqstrings and seqs don't have to but currently do
23:43:59SmaehtinAraq: Oh there's warning for that now? That's nice
23:53:07renesaccan I index in tuple fields with numbers? ie: how to iterate over two or more tuples together?
23:54:22Araqrenesac: for a, b in fields(x, y)
23:54:48Araqa iterates over x and b over y then
23:55:01Araqthe tuples must be the same type
23:56:35renesacoh, that second requeriment might be problematic....
23:56:46renesacthey have the same number of fields, but of different types
23:56:53renesac(float vs int)
23:57:00Araqhmm try it
23:57:04renesacok
23:58:26renesactype mismatch..
23:58:47renesacwith two tuples of the same type it indeed works
23:59:48Araqrenesac: edit compiler/semstmts.nim, line 562