<< 05-12-2013 >>

00:00:01MFlamerno, for some nice syntax for ADT's
00:01:01MFlamerbut, this macro could create an object with variants that were all ref's and some seperate strucs to hold the data
00:01:54MFlamershit, the macro could also make some decisions on wetherto allocate or not based on difference in size of the variant fields
00:02:05MFlamerbut, gotta start simple
00:02:18MFlamerfowl: what do you mean?
00:02:41fowltype
00:02:43fowl TA = object
00:02:48fowl TB {.macro.} = object
00:02:51fowl TC = object
00:03:26EXetoCI'm not sure I follow. does this mean that everything will be provided by a library, or that the compiler will expose a lot of options?
00:03:30fowlyou could have macro return a statement list where you define procs with the TB type and it be seamless
00:03:32fowli think
00:04:31EXetoCthat was directed towards MFlamer btw
00:04:37MFlamerbut wouldnt the proc be inside the type block? or can you get out
00:05:22MFlamerwhat happens if you dont attach the generated ast to callsite?
00:06:08EXetoCdo you have a choice?
00:06:39MFlamerEXetoC: we have alot of different stuff in the conv. now. The way I see it there are 3 ways to represent ADT's or Sumtypes if you will
00:07:10MFlamer1) a union of all the variant fields + a variant tag
00:07:18fowlMFlamer, it would take some magic but that parts not implemented yet so its doable
00:08:14MFlamer2) same as 1 but generate strucs instead of a union to save memory
00:08:54MFlamer3) each variant is a ref or ptr to some dyn aloc struc with the fields for each variant
00:09:34MFlamerso in 3 the variants are all the same size, but we have another indirection
00:09:39*DAddYE quit (Remote host closed the connection)
00:09:51BitPuffinis this possible? TTerrainSections = array[int64.min..int64.max, array[int64.min..int64.max, PTerrainSection]]
00:09:53BitPuffinlol
00:10:07BitPuffinI mean is indexing from a negative value legal?
00:10:30MFlamer1) is whats in Nimrod now, 3) can be accomplished now if the user structures his data this way
00:11:13BitPuffinMFlamer: was that to me?
00:11:18EXetoCBitPuffin: yes
00:11:21MFlamer2) is some idea zahary mentioned that I started to implement, but am sota stuck. And, not sure if it gets us much anyway
00:11:30BitPuffinEXetoC: cewl :D
00:12:00MFlamerBitPuffin: no, i'm rambeling to EXetoC
00:12:40BitPuffinMFlamer: carry on
00:12:42EXetoCMFlamer: I don't know what's best. I just thought it would be cool if the compiler could decide what strategy to use, unless maybe the user explicitly decides
00:13:41MFlamerNow, another thing on the table (also mentioned by some other users here recently) is the desire for a macro to define our object variants with seperate kind enums etc. in a more elegant Haskell like style
00:14:25MFlamerEXetoC: hat would be really cool
00:14:30MFlamerthat*
00:15:09BitPuffinsay WHAT
00:15:44BitPuffinhttps://gist.github.com/BitPuffin/7798020
00:15:48BitPuffinAraq: ^^^^^^^^^^
00:16:08fowlyou're comparing typedescs
00:16:20BitPuffinTTerrainSections = array[int64.min..int64.max, array[int64.min..int64.max, PTerrainSection]]
00:16:28BitPuffinfowl: no u
00:16:31BitPuffinno but seriously no
00:16:41fowlone day you will learn nimrod
00:16:55BitPuffinone dayyy!
00:17:05fowlBitPuffin, its .low and .high, not .min and .max
00:17:12BitPuffinah
00:17:15BitPuffinwtf
00:17:20BitPuffinI am drunk am I not
00:17:30*Varriount_ joined #nimrod
00:17:33OrionPKMnow why doesnt low/high work for uint fowl
00:18:02fowlOrionPKM, no idea
00:18:13BitPuffinfowl: one day you will learn nimrod
00:19:28*travisbrady quit (Ping timeout: 250 seconds)
00:20:30EXetoCmakes no sense :p
00:20:40*Varriount quit (Ping timeout: 245 seconds)
00:20:40*Varriount_ is now known as Varriount
00:22:08EXetoCMFlamer: why all these proposed helper macros? will the whole thing be implemented in a library?
00:22:12EXetoCrather than in the compiler
00:22:35EXetoCfor example, will it be integrated with 'case'?
00:23:13MFlamerThe struct representation for object variants would be done in the compiler
00:23:36MFlamerThe only macro here would be to streamline the syntax a bit
00:23:52MFlamerHave you seen Haskell ADT's ?
00:24:52EXetoCnope
00:25:13VarriountEXetoC, technically, aside from their own set of bugs, macros could replicate many parts of the grammer. After all, they're just procedures that act on AST's, like 75% of the compiler.
00:26:15MFlamerdata Tree a = EmptyTree
00:26:15MFlamer | Node a (Tree a) (Tree a)
00:26:29MFlamerthats the equivalent of
00:26:33MFlamertype
00:27:08MFlamer tkTree = enum
00:27:28MFlamer tkEmptyTree,
00:27:39MFlamer tkNode
00:27:55MFlamer TTree = object
00:28:04MFlamersorry
00:28:20MFlamer TTree[T] = object
00:28:48MFlamer case kind:
00:29:48MFlamer of tkNode: l,r: TTree[T]
00:30:01MFlamer else: nil
00:30:41MFlamersomething like that, Just nice to have a macro to define the enum and object together
00:30:43EXetoCyeah I'm familiar with the concept
00:31:31EXetoCsince I've been using Rust a little
00:32:23MFlamerok, alot like rust
00:32:49EXetoCyeah same basic idea
00:34:52VarriountWhy is it that people are so attached to semicolons and braces?
00:35:08EXetoCcus they are FOOLS
00:36:09EXetoCfools I say
00:36:33BitPuffinhmm, can't check if an array is nil
00:37:07EXetoCaren't arrays value types?
00:37:40BitPuffinI guess
00:38:27fowlthats a massive array btrw
00:38:38EXetoCwut
00:38:57fowlBitPuffin, what is sizeof(TTerrainSections)
00:39:11VarriountAny particular reason the function for getting command line input is in its' own module, with no other procs?
00:39:12EXetoCoh. yeah
00:39:43BitPuffinfowl: dunno
00:39:44fowlVarriount, paramcount, paramstr are in system.nim
00:39:45EXetoCthat's liek huge
00:39:55Varriountfowl, I mean, at run time.
00:39:58EXetoChuger than your RAM
00:40:03VarriountLike, prompting for user input
00:40:05EXetoCyes, huger
00:40:13fowlrdstdin?
00:40:17BitPuffinguys relax
00:40:18Varriountfowl, yeah.
00:40:23BitPuffinit's an array of PTerraiSections
00:40:27BitPuffinnot TTerrainSections
00:40:33BitPuffinso most of that array will be nil
00:40:40Varriountthere's only 1 or 2 functions in that module.
00:40:46fowlBitPuffin, im just curious what the size is
00:40:54EXetoCthe size is fixed, so don't you get about a gazillion pointers?
00:41:07fowl8 bytes x (high(uint64) ** 2)
00:41:24EXetoCc(:)-<
00:41:53BitPuffinfowl: I'd guess around 30mb
00:42:34BitPuffinEXetoC: yeah but it's all nil yo
00:42:54EXetoCdon't you mean ~835511105130522005...... bytes?
00:43:11BitPuffinhmm wait
00:43:21MFlamernil is still a word
00:43:22EXetoC2**64 ** 2 * 8. no? :D
00:43:44BitPuffinMFlamer: well it doesn't contain the string nil
00:44:06BitPuffinif they are all nil, doesn't it mean they all point to the same place?
00:44:20BitPuffintry it on your computors
00:44:36EXetoCyes, but each pointer occupies a word, and in this case it's a gazillion of them
00:44:40MFlameryeah, but the pointer is still there, so 64 bits
00:44:46MFlamer8 bytes
00:44:48VarriountAnyone here think that it would be more intuitive to bundle rdstdin into the terminal module?
00:44:51EXetoCfowl: confirm plz. don't wanna look stupid here
00:45:02MFlamerbut you know that :-)
00:45:12fowlnil pointer still takes 4 or 8 bytes
00:45:20fowlnil just means its value is 0
00:45:27MFlamerthats what i said
00:45:58EXetoCBitPuffin: type 2**64 ** 2 * 8 in the python interpreter
00:46:48MFlameruse a quadtree or something
00:46:50fowllol it says sizeof is 8 bytes, so maybe it is a ptr
00:49:47BitPuffinerf
00:51:21BitPuffinMFlamer: ugh, fine just as long as my computer doesn't explode
00:52:07*XAMPP quit (Read error: Connection reset by peer)
00:52:08MFlamerWhat are you doing? Where's the code?
00:52:40BitPuffinMFlamer: a game on my harddrive and in a private repo on bitbucket
00:53:04MFlamervery exclusive
00:53:31BitPuffinyaman
00:53:43MFlamerhow do the rest of these guys know what you are talking about?
00:53:57MFlamerAre they in the club
00:54:08fowlno, we're unworthy :(
00:54:24EXetoCwe were only discussing this really massive array
00:54:36BitPuffinMFlamer: because I'm practically tossing all the source code around in snippets?
00:55:03fowlBitPuffin, whta kind of game is it anyways
00:55:37fowlBitPuffin, are you going to have a pay-to-win model (free to play but you gotta pay to get good equipment)
00:55:52BitPuffinfowl: no
00:55:54BitPuffinbrb reboot!
00:56:18MFlamerBitPuffin: good luck man
00:57:45*BitPuffin quit (Read error: No route to host)
00:57:51VarriountMeh, none of the games I like to play could have pay-to-win models
00:58:28EXetoCfree to play ~= pay to win == crap :p
00:59:06*Varriount wishes there were more narrative adventure games.
00:59:06*BitPuffin joined #nimrod
00:59:29fowlVarriount, games like what
00:59:30EXetoCVarriount: system.nim does have readLine though
01:00:44fowlVarriount, oh and terminal.nim has nothing to do with readline
01:01:02Varriountfowl, http://www.gog.com/game/primordia
01:02:50EXetoCfowl: what readline? there's readLine in system, and then there's the readline lib which rdstdin references
01:02:55VarriountEXetoC, that's for files, not standard input (although you might be able to use the standard input stream)
01:03:07EXetoCyes
01:03:18EXetoCwhich is a terminal lib, right? so it might make sense to merge it with terminal
01:03:32EXetoCif it really is so bad to have such a tiny module
01:03:49*wolfspaw joined #nimrod
01:04:24wolfspawHi! I'm trying to use C scanf on nimrod, this is how I tried:
01:04:30wolfspawproc scanf(formatstr: cstring) {.importc: "scanf", varargs.}
01:04:30wolfspawvar tst: int
01:04:31wolfspawscanf("%ld", addr(tst))
01:04:31wolfspawwrite(stdout, tst)
01:04:55wolfspaw--- Which gives this error: -------
01:04:56wolfspawerror: conflicting types for 'scanf'
01:04:57wolfspaw N_NIMCALL(void, scanf)(NCSTRING formatstr, ...);
01:04:57wolfspaw ^
01:04:57wolfspawnote: in definition of macro 'N_NIMCALL'
01:04:57wolfspaw # define N_NIMCALL(rettype, name) rettype __fastcall name
01:05:10OrionPKMmake a gist please
01:05:34EXetoCVarriount: so it's part of the same interface, and as such it can be used for keyboard input as well
01:05:52wolfspawOrionPKM okay, hold'on
01:06:23OrionPKMvarriount you checked that stuff in yet?
01:06:34VarriountOrionPKM, haven't had the chance.
01:06:39OrionPKMnp
01:06:40wolfspawOrionPKM: https://gist.github.com/anonymous/7798509
01:06:47VarriountI spent 5 hours today on a math test
01:07:04Varriountand I'm gonna have to stay up late tonight in order to get a paper done.
01:07:43VarriountWhy professors insist on assigning all the projects at the end of the semester, on top of exam studies, I have no idea. :<
01:08:02OrionPKMnp
01:08:04EXetoCsadistic bastards
01:08:11EXetoCwell, have fun
01:08:12OrionPKMcan you link the plugin you had made again?
01:08:19Varriountwolfspaw, I think scanf is already defined.
01:08:47VarriountOr maybe my brain is just addled
01:09:03EXetoCBitPuffin: just tell people to enable plenty of swap before attempting to run your game :p
01:09:33*MFlamer quit (Remote host closed the connection)
01:09:38EXetoCsorry, I'll drop that subject now
01:09:52OrionPKMwolfspaw, add in header: "<stdio.h>" into the pragma
01:10:35VarriountOrionPKM, https://gist.github.com/Varriount/7775253
01:10:45OrionPKMthanks
01:10:49EXetoCit says something about a conflict though, so I wonder if that will help
01:10:49*DAddYE joined #nimrod
01:10:58EXetoCeither way, it should be a bug
01:11:31Varriountwolfspaw, try naming your procedure something else.
01:11:51wolfspawOrionPKM: fantastic! Thanks, really simple!
01:11:51BitPuffinEXetoC: yeah :P
01:12:18BitPuffinI'm still not quite sure that I understand, I guess what you mean is that the address to nil still takes up space?
01:12:47EXetoCyes, the word-sized pointer
01:12:56BitPuffinproblem with things like quadtree is that it'll get slower the further you get
01:14:11EXetoCso, ints would've taken up just as much space
01:15:50*DAddYE quit (Ping timeout: 264 seconds)
01:15:53VarriountHuh, today I learned that you can run dll functions from the windows command line
01:16:16BitPuffinEXetoC: microsoft word is much bigger than an int
01:16:20BitPuffinno but what do you mean word
01:16:53BitPuffinyay fowl has a quadtree
01:17:14fowl^^
01:17:18EXetoCso, how about a reasonably sized array instead? :p unless you need to allocate and de-allocate dynamically
01:17:19wolfspawOrionPKM: would be feasible to wrap that scanf in a Nimrod macro, doing compile-time safe-checks (for making sure the number and types of variables match), as to expose a safe scanf with zero runtime overhead?
01:17:31BitPuffinfowl: again with the whole searchability thing
01:17:37BitPuffinfowl: gotta organize your stuff :p
01:17:54*DAddYE joined #nimrod
01:18:03OrionPKMwhy not :P
01:18:33EXetoChttp://en.wikipedia.org/wiki/Word_%28computer_architecture%29
01:19:25BitPuffinollrajt
01:20:14Varriountwolfspaw, any particular reason you're wrapping scanf, instead of using nimrods standard lib?
01:20:21BitPuffinfowl: question, how come children is a seq
01:20:34BitPuffinfowl: you already know that there is 4 children
01:21:25fowlno children is the actual objects in a node
01:21:46fowlthe node is partitioned when there are too many children in it
01:21:48BitPuffinah
01:23:18OrionPKMvarriount grr why hasnt AAAPackageDev been updated to st3
01:23:43EXetoCwhy am I just sitting here doing nothing
01:24:19VarriountOrionPKM, it might be, however I use sublime text 2
01:24:32OrionPKMit's not in package control for st3
01:24:38Varriount*shrug*
01:25:03VarriountIt probably wouldn't be hard to get it running.
01:26:58VarriountOrionPKM, you can keep just the xml/json stuff - I can always convert whatever you write to yaml, edit, and convert back.
01:27:07fowlBitPuffin, you probably want an octtree for 3d, right
01:27:11wolfspawvarriount just curiosity/exploring, I'm also used to C (scanf) and C++ (streams) and in nimrod I just found the "parseInt", "parseFloat" ways for getting formated input
01:27:56OrionPKMVarriount nah i'll see if I cant get this running
01:28:26Varriountwolfspaw, though the web documentation for the stdlib may not be the prettiest (go to python's documentation for that), it is immensely helpful.
01:28:41*mflamer joined #nimrod
01:29:03VarriountThough, it's by no means the ugliest either. *cough*javadoc*cough*
01:30:12BitPuffinfowl: well no because the terrain is actually 2d
01:30:21BitPuffinI mean the space it covers
01:30:28BitPuffinwell not the terrain
01:30:29fowlso its flat? :(
01:30:31BitPuffinbut the sections
01:30:33BitPuffinnonono
01:30:35fowlwhat kind of game is this
01:30:37BitPuffinthe sections are a 2d grid
01:30:44BitPuffinbut each section contains a terrain heightmap
01:30:46BitPuffin:P
01:30:49fowloh
01:31:09BitPuffinmakur sensur=
01:31:11BitPuffin?
01:31:17fowlyea
01:31:24BitPuffincool :D
01:32:11*shodan45 quit (Quit: Konversation terminated!)
01:32:22*shodan45 joined #nimrod
01:32:43fowlstop avoiding that question tho
01:33:07BitPuffinfowl: the octree question?
01:33:37fowlwhat kind of game
01:33:40BitPuffinah
01:33:45BitPuffinI'm not avoiding the question
01:33:47fowli hope its a remake of katamari damacy
01:33:52BitPuffinit's a game that you can play
01:33:52fowlthat would be swell
01:33:59BitPuffinif you move the mouse the camera moves
01:34:07EXetoCnice
01:34:08BitPuffinif you press w you move forward
01:34:23BitPuffinand if you press a you walk left
01:34:32BitPuffins, back and d right!
01:34:39BitPuffinso innovative
01:34:41fowlwhat happens if you click the mouse, do you swing a sword or fire bullets
01:34:46BitPuffinnothing
01:34:56EXetoCexplosions?
01:35:13BitPuffinAraq pops out of a hole and scares you
01:35:42BitPuffinno but it's inspired by a game I played a couple of years ago now
01:35:55VarriountIf I press the spacebar, I expect flying honey badgers to pop out of my screen, and nothing less.
01:36:06VarriountBitPuffin, lemme guess, minecraft?
01:36:06BitPuffinhttp://january.cc/
01:36:11BitPuffinVarriount: nah
01:36:43BitPuffinyou won't see any boxy boxes here no
01:37:23fowllame
01:37:26fowlrequires flash 11.3
01:37:41fowlscumbag adobe
01:37:47BitPuffinyeah
01:37:48BitPuffinfuckas
01:37:56BitPuffinwell maybe that's a new version even
01:38:06BitPuffinI remember playing that a long while ago
01:38:25BitPuffinbut suddenly it seems like people have written about it in 2013
01:38:26BitPuffin:s
01:38:45EXetoCpokemon? super mario?
01:38:49BitPuffin2 years ago it was
01:38:56BitPuffinEXetoC: I already linked to the game
01:38:59OrionPKMvarriount think it's working, just had to manually install
01:39:02BitPuffintalk about party pooper :P
01:39:04EXetoCBitPuffin: ok that makes sense
01:39:30VarriountThe game I've alway's wanted to remake someday was a game originally on lego.com called Spybot: The Nightfall Incident
01:43:48*wolfspaw quit (Read error: Connection reset by peer)
01:43:49BitPuffinso a tuple can't be nil either? :(
01:43:51BitPuffinagh
01:44:33VarriountOrionPKM, are you planning on writing in YAML too?
01:44:42OrionPKMyeah
01:44:45BitPuffinhow do they expect me to free up the dataaaa
01:44:56OrionPKMif I can figure out how to get yaml -> XML
01:44:59EXetoCby not using a value type
01:45:09OrionPKMim watching louie CK right now though so im kind of distracted
01:45:15VarriountOrionPKM, ctrl+shift+p -> convert
01:45:17BitPuffinEXetoC: can I do ref tuple?
01:45:29BitPuffinor do I need to wrap it in a package
01:45:47OrionPKMvarriount the syntax highlighting is working, but that's not I guess
01:46:05VarriountOrionPKM, check the console
01:46:18Varriountctrl+`
01:46:25OrionPKMyeah I know
01:47:16VarriountAs a side note, sublime plugin development can be a pain - the api is.. useful for common tasks, but gets flaky for uncommon things.
01:47:28OrionPKMlooks like it's not working in ST3
01:47:30BitPuffinref tuple seem to work
01:47:32OrionPKMjust the syntax highlighting
01:47:42VarriountOrionPKM, any console errors?
01:47:43BitPuffinnot sure how to initialize that though
01:47:46OrionPKMyes, quite a few
01:48:15EXetoCBitPuffin: by using new. I don't think there's a shortcut for this
01:48:34VarriountOrionPKM, https://github.com/SublimeText/AAAPackageDev/pull/25
01:48:41EXetoCtype X = ref tuple[x, y: int]; var a: X; new(a); a.x = cake
01:49:05OrionPKMit hasn't been merged?
01:49:10BitPuffinEXetoC: aww
01:49:15BitPuffinEXetoC: oh well that'll do
01:49:18VarriountOrionPKM, nope!
01:49:23EXetoCmake it an object if you want the shortcut
01:50:08EXetoCthe syntax can be retained in some cases by defining a converter
01:50:43BitPuffinEXetoC: well it's meant to be passed to GL too so an object is not really a good choice
01:50:45fowldid you know there is also new(t:typedesc): ref t
01:50:58EXetoCBitPuffin: the layout is identical
01:51:27BitPuffinEXetoC: so nimrod doesn't handle memory layout for us?
01:51:41EXetoC'object' defines a value type
01:51:42BitPuffinor do you mean put the array in an object
01:51:46BitPuffinref object*
01:51:48EXetoCand then you can stick ptr or ref onto it if you want
01:51:58*DAddYE quit (Remote host closed the connection)
01:52:30*DAddYE joined #nimrod
01:52:32EXetoCeither of those three should be fine. they don't have any hidden fields
01:52:53OrionPKMvarriount fewer errors
01:54:14EXetoCnot that it would matter, unless for some reason you couldn't set the stride
01:55:41VarriountOrionPKM, are they fixable you think?
01:56:38*DAddYE quit (Ping timeout: 240 seconds)
01:56:39EXetoCbadger badger
01:56:39OrionPKMmaybe, if not i'll go back to ST2
01:56:57OrionPKMVarriount I only upgraded because somehow my ST2 install became hopelessly corrupted, theme was all fucked up
01:57:14OrionPKMbut that was several months atgo
01:57:15OrionPKMago*
01:58:03EXetoCmust.. resist.. meta.. programming..
01:58:56BitPuffinEXetoC: vector lib?
02:01:08EXetoCBitPuffin: asserting == and ~= :p
02:01:17EXetoCfor epicly compact unit tests
02:01:49VarriountI hate writing unit tests. I know that they're supposed to be good, but...
02:02:16BitPuffinVarriount: fuckem
02:04:02EXetoCit's hard to get going
02:06:10BitPuffinEXetoC: with your game project?
02:06:29EXetoCbut I think it's satisfying. at least those for math-oriented modules
02:06:33EXetoCBitPuffin: with unit tests
02:06:38BitPuffinEXetoC: ah
02:06:40BitPuffinyeah
02:06:55BitPuffinhonestly almost everytime I don't test things in linagl it turns out to be wrong xD
02:07:06BitPuffinwell okay that's a bit over the top
02:07:12BitPuffinbut it has happened some times at least
02:07:31BitPuffinsome of it not getting caught was the compiler not erroring when it should etc
02:07:34BitPuffinbut that's fixed now
02:09:04VarriountOrionPKM, I'm off to do some things, I'll be back in ~1 hour
02:09:17OrionPKMI'll be out probably
02:09:18OrionPKMttyl
02:14:04EXetoCdot(vec2(0, 0), vec2(0, 0)) ~=? 0
02:14:17EXetoCnear equality assert c(:)
02:15:15fowlEXetoC, there's a unittest module
02:21:26EXetoCfowl: ok, trying to figure out how to use it
02:24:57fowlhttps://github.com/fowlmouth/nimlibs/blob/master/tests/test_bbtree.nim
02:25:31EXetoCthat certainly helps
02:32:55*shodan45_ joined #nimrod
02:32:55*shodan45 quit (Write error: Connection reset by peer)
02:34:39*shodan45 joined #nimrod
02:34:46*shodan45_ quit (Read error: Connection reset by peer)
02:35:20BitPuffingoodnight!
02:35:36EXetoCbbbb
02:35:49EXetoCfowl: it just that it seems a little buggy
02:36:28*xenagi joined #nimrod
02:38:10*shodan45 quit (Read error: Connection reset by peer)
02:38:14*shodan45_ joined #nimrod
02:39:37*BitPuffin quit (Ping timeout: 246 seconds)
02:42:18EXetoCfowl: that module fails like so: "lib/pure/unittest.nim(127, 42) Error: index out of bounds"
02:42:21EXetoCreporting it now
02:47:26*shodan45_ quit (Quit: Konversation terminated!)
02:47:31*shodan45 joined #nimrod
02:49:26*mflamer quit (Ping timeout: 240 seconds)
02:53:17*DAddYE joined #nimrod
02:55:23*shodan45 quit (Quit: Konversation terminated!)
02:57:26*DAddYE quit (Ping timeout: 240 seconds)
03:03:09*DAddYE joined #nimrod
03:07:21*DAddYE quit (Ping timeout: 240 seconds)
03:54:55*DAddYE joined #nimrod
03:56:40*brson quit (Quit: leaving)
03:59:02*DAddYE quit (Ping timeout: 240 seconds)
04:04:53*hoverbear joined #nimrod
04:30:46*yodi joined #nimrod
04:56:52*DAddYE joined #nimrod
05:01:35*DAddYE quit (Ping timeout: 260 seconds)
05:14:32OrionPKMvarriount i committed a bunch o stuff
05:30:53yodiit would be nice if nimrod can do this
05:31:23yodifor i in countfrom(10, 1): ...
05:31:37yodior
05:31:50yodifor i in 10..1:
05:33:30fowlhttps://gist.github.com/fowlmouth/7800592
05:34:52*xenagi quit (Read error: Connection reset by peer)
05:37:30fowlyodi, ^
05:37:37yodithanks fowl, i meant support into the core api
05:59:02*DAddYE_ joined #nimrod
05:59:16*DAddYE_ quit (Remote host closed the connection)
05:59:22*DAddYE_ joined #nimrod
06:04:47*hoverbear quit (Quit: Textual IRC Client: www.textualapp.com)
06:06:04*hoverbear joined #nimrod
06:10:50*Varriount quit (Ping timeout: 246 seconds)
06:21:40*achim joined #nimrod
06:25:27*DAddYE_ quit (Remote host closed the connection)
06:25:58*DAddYE joined #nimrod
06:30:14*DAddYE quit (Ping timeout: 240 seconds)
06:32:20*boydgreenfield quit (Quit: boydgreenfield)
06:35:27*hoverbear quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:44:05*mflamer joined #nimrod
07:26:28*DAddYE joined #nimrod
07:31:50*DAddYE quit (Ping timeout: 240 seconds)
07:36:29*Varriount joined #nimrod
07:46:14*DAddYE joined #nimrod
07:46:28*DAddYE quit (Remote host closed the connection)
07:46:34*DAddYE joined #nimrod
08:11:41*mflamer quit (Ping timeout: 272 seconds)
08:21:07*DAddYE quit (Remote host closed the connection)
08:21:36*DAddYE joined #nimrod
08:27:13*girvo joined #nimrod
08:27:58*girvo quit (Client Quit)
08:32:36*girvo joined #nimrod
09:13:35*girvo quit (Quit: My iMac has gone to sleep. ZZZzzz…)
09:20:39*Mat3 joined #nimrod
09:20:50Mat3hi all
09:22:10fowlhey
09:29:46*girvo joined #nimrod
09:30:05*girvo quit (Remote host closed the connection)
09:30:31*girvo joined #nimrod
09:34:00*CarpNet joined #nimrod
09:46:59Mat3hi fowl
09:47:25*Mat3 reading the logs
09:51:46*girvo quit (Quit: My iMac has gone to sleep. ZZZzzz…)
10:29:09Mat3one sting which I want to change in my source is the dependency on some constants I must define, specially the lack of MAP_ANON or MAP_ANONYMOUS in the POSIX layer (which difer from OS to OS). I know these constants are not part of POSIX 1.x. On the other side it's the only way to reserve system memory though mmap with setted executable flag (which indeed is needed for executing generated machine code on most xNIX systems)
10:29:22Mat3^differ
10:31:24Mat3^^ the only way without handling faked file-handles. Another alternative would be using valloc (not part of POSIX) and mprotect (with non existent MAP_ANON flag)
10:33:56Mat3I think it would be nice to extend the POSIX wrapper with both valloc and MAP_ANON, because there are often used (but non-stadard of course)
10:34:01Mat3^standard
10:44:35*Mat3 quit (Ping timeout: 260 seconds)
11:01:57*Mat3 joined #nimrod
11:06:50*Mat3 quit (Ping timeout: 264 seconds)
11:27:01*faassen left #nimrod (#nimrod)
11:50:55*BitPuffin joined #nimrod
11:51:59*BitPuffin quit (Client Quit)
11:54:58*faassen joined #nimrod
11:57:21*BitPuffin joined #nimrod
11:57:44BitPuffinHey guys!
11:58:53dom96hey
11:58:59*dom96 is still sick :(
11:59:24dom96But i'm not only spreading germs, i'm also spreading the news of Nimrod! http://www.reddit.com/r/programming/comments/1s4iw1/converge_compile_time_metaprogramming_details/cdu48cp
12:02:50BitPuffindom96: lol :D
12:02:55BitPuffinI'm trying out standing up working today
12:07:05dom96Cool. I hear of more and more people doing that.
12:07:27BitPuffinI just put my laptop on a bunch of books haha
12:07:42BitPuffinwhich doesn't help with the screen much but hey
12:07:48BitPuffinit might be an improvement at least
12:32:19dom96BitPuffin: how's the game going?
12:34:58yodicreating a game takes a lot of endurance
12:35:42yodii still have an unfinished game on my pc somewhere
12:39:54BitPuffindom96: behind but forward
12:40:05BitPuffindom96: got a flat tire on my bike today so that's gonna steal a lot of time too :(
12:40:22BitPuffinare all number types initialized to 0 by default?
12:41:13fowlBitPuffin, no, some of them are initialized to 42
12:41:24BitPuffinfowl: :O!
12:41:25fowlonly the 128bit types though
12:41:36BitPuffinerh
12:41:36dom96BitPuffin: aww that sucks
12:41:49dom96I'm missing a mock exam in school today...
12:42:04dom96I'm probably going to have to do it tomorrow in class ugh
12:42:41BitPuffindoes typedesc{TMatrix} work? And does it make it so that every subtype of TMatrix (ie. TMat4 = TMatrix[float32, range[0..3], range[0..3]] work?
12:42:46BitPuffindom96: mock?
12:43:08dom96BitPuffin: practice, trial, not-real-exam
12:43:32BitPuffindom96:
12:43:35BitPuffinah
12:43:39BitPuffindom96: that sucks :(
12:43:47dom96BitPuffin: I think that's a TR macro syntax.
12:44:05BitPuffindom96: you gonna have to de-abbrev that
12:44:14dom96BitPuffin: Yeah, I was going to go today but i'm coughing so much that I would distract everyone or choke trying not to cough during the exam lol
12:44:34dom96BitPuffin: Term Rewriting
12:45:12BitPuffindom96: haha :D
12:45:14BitPuffinright
12:45:16BitPuffinhmm
12:45:55BitPuffinwell I have an identity proc which looks like identity[T, N]()
12:46:05BitPuffinand I want a variation that provides TMat4.identity()
12:49:40dom96what's the signature of identity?
12:51:11dom96perhaps 'definition' is the correct term lol
12:51:24BitPuffindom96: yea I already showed you the signature haha
12:51:31BitPuffindom96: or do you mean mathematical?
12:51:48BitPuffinI = Iii = 1
12:52:02dom96oh, well huh. It's just: proc identity[T, N]() ?
12:52:02BitPuffinso the diagonal is 1
12:52:15BitPuffindom96: I already have that one
12:52:39dom96Show me the full proc please
12:53:11fowlyou want to pass "TMat4" as an argumetn? typedesc[TMat4]
12:53:45BitPuffinfowl: thanks!
12:53:50BitPuffindom96: it dun diddily work
12:54:03*dom96 is still curious what the proc looks like
12:54:27BitPuffindom96: it doesn't work but here:
12:54:44BitPuffinhttps://gist.github.com/BitPuffin/7804696
12:54:57BitPuffinguess it should be 1.T
12:54:58fowli've also seen people use "type T" in param type
12:55:06fowltype int #=> typedesc[int]
12:55:34BitPuffinwhich one is preferred by das komjunity?
12:55:45fowli dunno
12:56:16EXetoCtypedesc should be more common. I've never seen "type T"
12:56:26BitPuffinuh
12:56:30BitPuffinthat identity proc is wrong
12:56:48fowllooks wrong
12:57:00dom96Does "type T" actually work? I've never seen it either
12:57:03BitPuffinI don't know how it is even possible though
12:57:05fowlshouldnt identity be like [1 0 0 0 1 0 0 0 1]
12:57:08fowlfor 3x3
12:57:10BitPuffinI mean the result
12:57:15EXetoCdom96: seems like it
12:57:27fowldom96, yea i ve seen filwit use it
12:58:27BitPuffinhttps://gist.github.com/BitPuffin/7804744
12:58:30BitPuffinhahaha
12:58:32BitPuffinsay wtf
12:58:38dom96hrm, it works indeed.
12:58:39EXetoCtype T > T.type > type(T). makes sense
12:59:19BitPuffinI have NO IDEA where those numbers that weren't 1.0 came from
12:59:22BitPuffinseriously wtf
13:00:11fowlrun it more times see if its always those numbers
13:00:13dom96check what result is before you iterate over it
13:00:38BitPuffinfowl: nope, different err time
13:00:51BitPuffinguess I'm gonna have to iterate over num
13:00:59fowlsomeone wrong with the stack
13:01:02fowlsomething*
13:01:28BitPuffinbug in the nimrudd?
13:01:30EXetoC4.567...-41 ~= 0
13:01:45BitPuffinhmm
13:01:47BitPuffinright
13:01:47EXetoCI don't like the default formatting
13:01:54EXetoCit's often very confusing when debugging
13:02:00BitPuffinno it's stupid
13:02:14BitPuffini think you should have to be explicit to get the exp form
13:02:33EXetoCsometimes you can make out what the number is though, but it's difficult in this case
13:02:35EXetoCyeah
13:02:54BitPuffinwell guess my workaround is gonna be to put 0 there explicitely since it obviously can't initialize floats properly on its own
13:03:28fowldont check the generated c or anything
13:03:47dom96try to reproduce it standalone
13:03:58EXetoClike I said, it's 0 apparently, but maybe you're referring to something else
13:04:02BitPuffinno u
13:04:12dom96It should be '0.0000000000000000e+00'
13:04:48BitPuffinhttps://gist.github.com/BitPuffin/7804827
13:05:01BitPuffindom96: for now that's gonna have to be the workaround
13:05:06BitPuffini don't have time to report this bug right now
13:05:27fowloh haha
13:05:35fowlthat looks right anyways compared to the first version
13:06:03fowl1x1, 2x2, 3x3 were 1.0 the rest of the fields were whatever was on the stack
13:06:18BitPuffinfowl: well the initial proc was correct, just that for some reason it initialized the result with almost 0 lol
13:06:53dom96maybe arrays don't get implicitly initialised
13:07:07BitPuffinhttps://gist.github.com/BitPuffin/7804860 this didn't work though
13:07:25*girvo joined #nimrod
13:07:28BitPuffinguess there is no result either for that part
13:07:32*girvo quit (Client Quit)
13:07:39BitPuffinbut it whines about the m.R != m.C
13:07:44BitPuffinzahary_: fixit!
13:07:46BitPuffinlol
13:07:48BitPuffin:P
13:07:59fowlBitPuffin, it works for me
13:08:08fowlBitPuffin, the first version
13:08:13EXetoCwhy not just evaluate the part after result? since you're returning expr anyway
13:08:55BitPuffinfowl: ah the first version works yes
13:08:56fowlhttps://gist.github.com/fowlmouth/7804881
13:09:22fowlthen what are we talking about
13:09:25fowlare you drunk again
13:09:26BitPuffinEXetoC: What do you mean, R and C has to be identical
13:09:31BitPuffinfowl: this time you are the drunk wan
13:09:52fowlhttps://gist.github.com/BitPuffin/7804744
13:09:59fowlyou're drunk
13:10:04dom96fowl: Maybe he has something on the stack, while you don't?
13:10:13BitPuffinfowl: look at the gist you alcoholic :P
13:10:43BitPuffinI probably do have something on the stack
13:10:47fowlthat was the gist from: heres my function, why does it give this result
13:10:49BitPuffinbecause there are variables created before it
13:10:56dom96precisely
13:11:04dom96Show us your full code :P
13:11:21BitPuffinfowl: well that's not even what we are talking about, gotta keep up maaaaaan
13:11:24BitPuffinsure I'll push
13:11:28BitPuffinin the mean time find the repo
13:11:31BitPuffinbecause I'm not gonna link
13:11:49dom96https://bitbucket.org/BitPuffin/linagl right?
13:12:41fowlwhats so great about bitbucket
13:12:58BitPuffinalright it's pushed
13:13:00dom96free private repos
13:13:01BitPuffindom96: yup
13:13:08BitPuffinfree private repos + mercurial support
13:13:19fowlwhos thelonelybyte
13:13:24dom96what's so great about mercurial? :P
13:13:25BitPuffinfowl: yo moma
13:13:43fowlBitPuffin, thats the one thats linked to from linagl on github
13:13:55BitPuffinfowl: ah
13:13:57BitPuffinfowl: old repo
13:14:06BitPuffinfowl: dom96's link nao
13:14:21fowlBitPuffin, you should try the first way again
13:14:29BitPuffinno
13:14:36fowlwith one loop, but before the loop use "reset result"
13:14:50BitPuffinfowl: but that's even more efficient isn't it?
13:15:02EXetoCgonna report it?
13:15:11fowlBitPuffin, more efficient than what
13:15:41BitPuffinEXetoC: I'd like to but there is no time!
13:16:50EXetoCk
13:20:53EXetoC"http://build.nimrod-lang.org/docs/manual.html#var-statement" it'd be odd if it didn't apply to return values etc
13:21:02EXetoCI didn't know that enums were initialized like that
13:22:53fowlEXetoC, im pretty sure initialization is done with memset0()
13:23:30fowlreset does the same thing, so if that fixes the function then we found the issue
13:25:37EXetoCit'd be convenient if the first enumerator was the default, but then again it often is 0 anyway
13:25:37fowlwhat do i know
13:25:39fowlim drunk
13:26:31EXetoCand an invalid value conveniently stringifies to "invalid data" or something like that
13:26:55EXetoCfowl: when did you last compile test_bbtree successfully?
13:28:32yodiis there list comprehension equivalent in nimrod?
13:31:30fowlEXetoC, probably whenever i committed it
13:33:27fowlyodi, yes, map()
13:35:01fowlEXetoC, minimal test works though
13:35:23fowleigenlicht, https://gist.github.com/fowlmouth/7805216
13:35:26fowlEXetoC, *
13:35:42EXetoCok
13:36:35EXetoClist comprehensions are a little more concise though, but a macro and/or more compact lambdas might help (that's just a couple of macro bug fixes away I think)
13:46:44*Mat3 joined #nimrod
13:49:10yodiEXetoC: i agree, even better still an implementation something like LINQ
14:00:46BitPuffinyay we now have orthographic projection :D
14:02:59BitPuffinperspective coming right up
14:24:40*achim quit (Quit: Textual IRC Client: http://www.textualapp.com/)
14:32:40BitPuffinor well
14:32:46BitPuffinfirst orthographic inverse
14:40:12EXetoCgreat
14:40:28EXetoCand I just rendered a quad. awesome
14:44:44BitPuffinactually I'm gonna skip orthographic inverse for now and focus on perspective
14:44:54BitPuffinsince I don't need orthographic for this project!
14:45:11BitPuffinEXetoC: with projection? lol :)
14:47:08EXetoCnah
14:47:34BitPuffinEXetoC: just a plain triangle strip?
14:48:04BitPuffinhmm
14:48:24BitPuffinmaybe I should render my terrain as a triangle strip instead of with indices
14:49:28BitPuffinthat's probably both faster and more space efficient so why not
14:49:36EXetoChow do I explicitly print the same stack trace that is printed when not catching exceptions?
14:49:56EXetoCBitPuffin: indices are always used, so I don't know what you mean
14:50:30BitPuffinEXetoC: indexed triangles you goof
14:51:27BitPuffinEXetoC: it's when each triangle is assigned an index so that for meshes you don't have to store the vertices more than once per face
14:53:00*fundamental2 joined #nimrod
14:55:13dom96hi fundamental2
14:55:28fundamental2dom96: hello
14:55:35*fundamental2 is now known as fundamental
14:56:03BitPuffinwouldn't it feel strange to have a game that would track your distance to the screen and adjust the FOV accordingly? haha
14:56:57dom96That would actually be cool and quite possible with a kinect
14:57:21BitPuffinyeah it would be cool but it would probably cause nausea haha
15:03:01dom96yeah, that's the challenge heh
15:07:57EXetoCBitPuffin: im a nub. also, I blame the wording :p
15:08:35BitPuffinEXetoC: the wording makes perfect sense when you know what it is :P
15:28:14*travisbrady joined #nimrod
15:31:49BitPuffinokay we've got perspective projection!
15:32:35dom96ELI5
15:33:24dom96what that is
15:33:33BitPuffindom96: ?
15:33:40dom96explain like i'm five
15:34:32BitPuffinhahaha
15:34:43BitPuffindom96: you wanna know what perspective projection is?
15:34:59dom96yes
15:35:06BitPuffinyou don't know?
15:35:22BitPuffindo you know what orthographic projection is?
15:35:29dom96nope lol
15:35:32BitPuffinhaha
15:35:34BitPuffinwell okay
15:35:37BitPuffinopen blender
15:35:45BitPuffinpress 5 on the numpad
15:35:57BitPuffinand you will toggle between orthographic and perspective projection :P
15:36:19*dom96 can't be bothered installing blender
15:36:22dom96I'll just google it
15:36:31BitPuffinhttp://db-in.com/blog/wp-content/uploads/2011/03/projection_example.gif
15:36:33BitPuffindom96: ^
15:37:25dom96I see.
15:37:41BitPuffinhere you can see the details of how it works http://www.arcsynthesis.org/gltut/Positioning/Tut04%20Perspective%20Projection.html
15:40:25*dom96 seriously needs to play around with OpenGL
15:41:41*mflamer joined #nimrod
15:44:41BitPuffindom96: http://open.gl
15:46:01dom96BitPuffin: thanks
15:47:24OrionPKMoh, nice site
15:48:44OrionPKMdom96 orthogonal is useful for directional shadow mapping
15:49:14OrionPKMi.e. shadow maps cast from a directional light
15:49:51BitPuffinELH5
15:52:08OrionPKM:P
15:55:15*dirkk0 joined #nimrod
15:55:34Mat3ciao
15:55:49*Mat3 quit (Quit: Verlassend)
16:00:28BitPuffinrotations added
16:00:40BitPuffinhowever not around arbitrary axis or point yet
16:10:17dom96BitPuffin: Can you show us a screenshot?
16:11:32BitPuffindom96: maybe later if I manage to get the terrain rendering working tonight
16:11:48dom96cool
16:11:57*dirkk0 quit (Read error: Connection reset by peer)
16:12:35*travisbrady quit (Quit: travisbrady)
16:13:46*dirkk0 joined #nimrod
16:14:02BitPuffindom96: right now I'm only adding the matrix transformations so that I can get going with the rendering
16:14:19OrionPKMprocedural terrain generation?
16:15:13BitPuffinOrionPKM: yeah later but today only rendering
16:15:24OrionPKMmm, ok
16:15:36BitPuffinhmm
16:15:53BitPuffinproc rotateAround(point, angle) or rotateAround(angle, point) ?
16:17:55*zielmicha joined #nimrod
16:19:20EXetoCwhy not just rotate?
16:19:27EXetoCpt.rotate(angle) ?
16:22:42BitPuffinEXetoC: I don't think it's as clear what's happening there
16:23:09*mflamer quit (Ping timeout: 272 seconds)
16:23:23BitPuffinsome NEWBS might go "Why would you rotate a point ©_©"
16:26:18BitPuffinEXetoC: or, one way wone could do it would be to make it so that you write "around(pt).rotate(angle)"
16:27:11BitPuffinbut that's not gonna be intuitive
16:27:14BitPuffineven if it reads nice
16:27:20BitPuffinbut when glossing the api
16:27:32BitPuffinsome NEWBS might go "What is around ©_©"
16:28:13EXetoCisn't it sort of like "rotate this point around an angle"? would that be an accurate description?
16:29:40BitPuffinEXetoC: no it's when you use the point as the thing you rotate around
16:30:46EXetoCI don't follow. someone with more experience should chime in
16:31:26BitPuffinEXetoC: basically think of it as the center of mass
16:31:36BitPuffinkind of at least
16:31:38*girvo joined #nimrod
16:31:58BitPuffinif you rotate an object in SPACE!!! it will rotate around it's center of mass
16:32:10BitPuffinbut say you want the center of mass to be the earth
16:32:31BitPuffinas you might wanna do if you wanna rotate the moon around the earth
16:32:48girvoquestion: are the idetools fast enough to be run in real-time? I'm working on QSciTE at the moment, and am thinking about better integration
16:32:51BitPuffinanyways I'm gonna call them rotateAround rotatexAround etc
16:33:35BitPuffinEXetoC: makes sense?
16:33:47BitPuffinorbiting
16:35:12girvoso trying to decide the right way to go about it
16:38:41EXetoCBitPuffin: yes
16:39:02EXetoCBitPuffin: it's similar in unity apparently: "transform.RotateAround( renderer.bounds.center, transform.TransformDirection(Vector3.up), angle)"
16:40:22dom96girvo: To me they still seem a bit too slow, but I haven't tested them recently. Play around with CAAS (Compiler as a service) and see if it's fast enough for you.
16:40:32EXetoCBitPuffin: "c2nim you bad muthafucka" have you confirmed that your approach works correctly? :p
16:40:48girvodom96: will do, cheers
16:40:58BitPuffinEXetoC: in portaudio?
16:41:01EXetoCya
16:41:08EXetoCdom96: it is? have you tested on any large projects?
16:41:12BitPuffinI haven't played any sound yet
16:41:15BitPuffinbut it doesn't crash xD
16:41:24EXetoCit seemed to be fairly fast in my case, but then again my project is pretty small still
16:41:28EXetoCok
16:41:29girvodom96: Oh! Neat!
16:41:35dom96EXetoC: I think I tested it on Aporia.
16:42:09dom96But it was a long time ago now, so there is a chance the speed has improved greatly.
16:42:10EXetoCdom96: got a KLOC estimate?
16:42:16girvodom96: that's actually pretty cool. I'm currently working on QSciTE and fiddling with clangs similar tools, and remembered that nimrod had something but CAAS is another level
16:42:16EXetoCoh
16:43:40*IrvMG joined #nimrod
16:43:58*XAMPP joined #nimrod
16:46:29girvodom96: am going to have a play with it some more once I've fixed a few bugs in QSciTE. And give it an actual release DMG already, it hasn't had a build in 18 months but i finally got it compiling tonight
16:46:56girvoif only Nimrod could interface with Obj-C/Cocoa... one can dream, can't they?
16:47:12C0C0damn cocoa
16:47:19C0C0allways triggers my highlighting
16:47:27girvohaha sorry! :)
16:47:28*IrvMG_ joined #nimrod
16:47:33C0C0:P
16:47:55*IrvMG quit (Ping timeout: 245 seconds)
16:48:12girvobut seriously, screw it. why couldn't they have done a nice C API, then built the Mac idioms in Obj-C on top... then you get language binding for free(ish)
16:48:45IrvMG_Hello
16:51:43NimBotdom96/jester master 5c5bd96 Hitesh Jasani [+0 ±1 -0]: Update OSErrorMsg usage due to nimrod 0.9.4 deprecation
16:51:43NimBotdom96/jester master 82bd1c1 Dominik Picheta [+0 ±1 -0]: Merge pull request #6 from hiteshjasani/master... 2 more lines
16:51:58BitPuffingirvo: it can interface with obj-c
16:52:00BitPuffinand cocoa
16:52:02BitPuffinif you write the binding
16:52:09BitPuffinnimrod can compile to obj-c
16:52:27girvoBitPuffin: funny you say that, I just started looking at other bridges and wanted to see how painful a binding would be...
16:52:39C0C0BitPuffin: fuuu :P
16:53:00girvoBitPuffin: Considerng that Nimrod and Obj-C are probably equally powerful, it might be doable.
16:53:20C0C0girvo: everything is turing complete - even magic the gathering :P
16:53:31BitPuffinC0C0: ?
16:53:36girvoThe only issue you have is that C0C0 (:D) has its weird idioms which translating to equiv Nimrod would be difficult
16:54:32C0C0girvo: :P
16:54:37girvoguess its time to get my hands dirty and see how this might work..
16:54:59C0C0BitPuffin: cocoa will always trigger my username highlighting
16:56:11EXetoCcocoa nom
16:56:29C0C0:P
16:56:34girvobrb I feel like a hot chocolate now
16:56:40*brson joined #nimrod
16:57:46BitPuffinC0C0: really? but your name is C0C0 not cocoa
16:57:53BitPuffingirvo: me too
16:58:12C0C0but people tend to write coco when they are using clients without tabcompletion
16:59:04EXetoCwell they fail at life
16:59:10C0C0^^
16:59:50girvoBitPuffin: excluding c2nim, do you know if there are any docs (its ok if they're incomplete) about writing bindings to stuff other than ANSI C?
17:00:01*travisbrady joined #nimrod
17:01:03BitPuffingirvo: there is an example of c++ wrapping in the repo
17:01:07BitPuffinI don't know much else
17:01:13girvoBitPuffin: Sweet, that'd be a start. Cheers
17:02:27girvoHAH. It's an Irrlicht example, neat! my first 3d engine I ever played with, back in the day
17:03:08EXetoCbut you might get an error saying that abs, sprintf etc are missing
17:03:17EXetoCyou do have to choose the cpp target, right?
17:03:39girvoSweet, I didn't know there was a obj-c target for nim
17:04:17girvoI'm going to have to play with this. That's awesome. This language man, I keep thinking I'd need something, only to find out is actually already there!
17:05:59EXetoCthe objc target actually works though. that's great
17:06:11girvoseriously? oh heck yes EXetoC
17:06:14EXetoCwell, I wonder how many people will use it, but still
17:06:39EXetoCI'll try to report the cpp bugs this week
17:06:57girvoof course, cocoa (sorry C0C0 lol) is such a big target to write bindings for (so much that RubyMotion makes a business out of it), but its certainly going to be fun to hack on
17:07:25C0C0:P
17:07:41girvocause theres an objc target, its actually feasible, though. that's crazy :/ lol
17:08:11*IrvMG_ quit ()
17:10:07girvoonly major issue I can think of is dealing with it's ARC; I can see issues using nimrod's GC on top of it (say, by using a nimrod lib with the bindings)
17:12:49girvo*giggle* now I'm picturing using nimrods DRC instead of cocoa's ARC, for cocoa itself. one can dream, right
17:13:10girvoanyway, i should go to bed, but thanks so much everyone. stoked to hear the obj-c target exists :D
17:17:26EXetoCc(:)-< l8r
17:18:20*girvo quit (Quit: Textual IRC Client: www.textualapp.com)
17:19:50*DAddYE quit (Ping timeout: 240 seconds)
17:23:36BitPuffinlol
17:23:40BitPuffinthis proc
17:25:08BitPuffinit's literally from hell
17:25:14EXetoCwot
17:25:54*MFlamer joined #nimrod
17:26:10MFlamerHi all
17:26:42BitPuffinhey MFlamer
17:27:00BitPuffinEXetoC: you don't know what you are getting in to with writing your own lib :P
17:27:09BitPuffinand you may not copy paste this proc!
17:27:27BitPuffinso much blood sweat and tears has been spent writing this proc
17:27:54EXetoCI have really low requirements
17:28:38BitPuffinEXetoC: so you don't need the ability to rotate around an arbitrary axis?
17:29:25EXetoCit's 2D now, but I think I have something like that in the matrix module for some other project
17:29:46BitPuffinah
17:29:51BitPuffinwell 2d rotation is easy
17:30:26EXetoCit was for 3 dimensions
17:30:46BitPuffinwhat was
17:31:08EXetoCthat matrix function
17:31:13EXetoCbut I'll have to confirm that it does indeed work
17:31:54BitPuffinEXetoC: you have a matrix for rotation about arbitrary axis in 3d?
17:34:21*OrionPKM quit (Remote host closed the connection)
17:38:35EXetoCBitPuffin: maybe https://gist.github.com/EXetoC/c19595131de44b674ce2
17:39:04BitPuffinEXetoC: that's rust
17:39:09EXetoCyes
17:39:29EXetoCI didn't say it was a nimrod project
17:39:30BitPuffinEXetoC: but wth there is no angle o.O
17:39:40BitPuffinanyways here is mine https://gist.github.com/BitPuffin/7809816
17:39:48BitPuffinand yes I plan to optimize it by storing the results haha
17:39:54EXetoCwell it should be local then
17:40:11*OrionPKM joined #nimrod
17:40:14BitPuffinEXetoC: well how can you construct a rotation matrix without an angle
17:40:16dom96We should really start writing down these pygments issues.
17:40:32dom96and then fix them
17:41:27BitPuffindom96: pygment?
17:41:36dom96BitPuffin: the syntax highlighter github uses
17:41:44BitPuffindom96: ah yeah
17:41:47BitPuffinlooks like shit
17:44:18dom96huh wait. Shouldn't that be 0'f32?
17:44:33EXetoCBitPuffin: actually, it's apparently only used here "fn from_components(pos: V3, scale: V3, rot: V3) -> M {"
17:44:47BitPuffindom96: doesn't matter if the first elements is float32s
17:44:50BitPuffinbut yeah there are mistakes
17:44:58BitPuffinI'm currently rewriting it to be more efficient
17:45:43dom96No, I mean. You wrote '0f32', I thought it must be '0'f32'
17:46:09BitPuffindom96: no it's fine to just write 0f32
17:47:32dom96interesting
17:48:32dom96So yeah, add any bugs you see to: https://github.com/Araq/Nimrod/wiki/Pygments-issues
17:49:26BitPuffinwhat's more efficient, store an element from an array in a variable if it is used many times or just index it?
17:51:03*DAddYE joined #nimrod
17:51:41OrionPKMhow many times?
17:52:01*DAddYE quit (Remote host closed the connection)
17:52:13*DAddYE joined #nimrod
17:53:03BitPuffinOrionPKM: 6!
17:54:02OrionPKMdom96 httpserver kinda sucks ;P
17:54:12dom96I agree
17:54:23OrionPKMi'm getting requests taking 57 seconds
17:54:30OrionPKMthen i hit the same request again and it's 1 second
18:03:19BitPuffinnow the proc is a bit better
18:03:48BitPuffinhttps://gist.github.com/BitPuffin/7810239
18:05:27VarriountHey dom96, may I add a page to the wiki on tips for python programmers coming to nimrod?
18:05:54BitPuffinVarriount: of course
18:05:55dom96Varriount: Sure. Add whatever you want, it is a wiki after all.
18:06:35VarriountI mean, the list isn't huge, but things like tuple unpacking, iterators, etc present some gotchas
18:07:46BitPuffinVarriount: it is also useful for a nimrod programmer looking at how things are done in python
18:08:43dirkk0now that you mention it - it would be cool to have python/nimrod side by side examples.
18:09:11EXetoCBitPuffin: it's an absolute rotation, so only a direction is needed
18:09:22Varriountdirkk0, well, I've had thoughts of doing something like what scala's tutorials are planned to do.
18:09:24EXetoCso yeah that's not the kind of rotation you were referring to
18:09:33VarriountTutorials for people coming from python, java, etc
18:09:54BitPuffinanyways would https://gist.github.com/BitPuffin/7810239 be faster if I switched axis[0] with x, axis[1] with y etc?
18:10:01VarriountHowever such a project is too ambitious, and the tutuorials already present are fine.
18:10:16VarriountBitPuffin, benchmark time!
18:10:24BitPuffinVarriount: I don't have time for benchmark ;_;
18:10:54Varriount:<
18:11:15BitPuffinmeh
18:11:17BitPuffinI'll leave it
18:11:22BitPuffingotta get on
18:12:23EXetoCyeah optimize later srsly :p
18:12:23BitPuffinEXetoC: I'm not even sure what you mean o.O
18:12:28BitPuffinyup
18:12:42BitPuffinlol
18:12:49BitPuffindidn't even check if it compiled before I pushed
18:12:52BitPuffinbut it did!
18:14:14dirkk0Varriount: I am not familiar what the Scala guys do ...?
18:14:18*travisbrady quit (Quit: travisbrady)
18:15:54*Durz0 joined #nimrod
18:16:23Araqhi Durz0 welcome
18:16:37Durz0hello
18:19:18EXetoCBitPuffin: well, I showed you the definition of from_components. the matrix is used like this https://gist.github.com/EXetoC/436a67b0200ea6932571
18:23:17AraqBitPuffin: axis[0] vs x shouldn't matter
18:25:29*travisbrady joined #nimrod
18:28:22EXetoCI managed to implement mouse look in that project, but I gave up when I couldn't figure out culling was one unit off :p
18:28:55EXetoC*figure out why
18:30:31EXetoCas in stuff <= 1 unit away from the camera would disappear
18:35:40BitPuffinAraq: ah, well then I might change it to x in the future because it is more readable I think
18:35:42*CarpNet quit (Quit: Leaving)
18:36:30BitPuffinEXetoC: I'll look in to that once upon a time
18:41:38BitPuffinAraq: you are gonna have to market nimrod to more london programmer/gamedev shops so that I can get a jerb there
18:43:24VarriountBah, they're all too busy drooling over Unity Engine :/
18:43:47BitPuffinEXetoC: why are you coding in rust ;) you are even the one who made me abandon rust! hypocrite!
18:43:52BitPuffinVarriount: yeah :/
18:44:02BitPuffinI plan to change that though
18:44:06BitPuffinbut it's gonna take a while
18:44:26VarriountBitPuffin, if you have to make a framework, make one that follow's libGDX's api design
18:44:44Varriounthttp://libgdx.badlogicgames.com/
18:45:06VarriountYes, it's java, however the api itself is both easy to use and powerful.
18:45:34Varriount(At least, for 2d stuff, I haven't worked with the 3d api's in a while)
18:45:41BitPuffinVarriount: yeah I already know about libgdx
18:45:49BitPuffinI have larger plans though
18:46:17EXetoCBitPuffin: I told you it was an old project
18:46:25BitPuffinEXetoC: port it!
18:47:43VarriountBitPuffin, look down at the bottom of that page, the credits for the site
18:47:44EXetoCI might port bits and pieces
18:47:59BitPuffinVarriount: let me guess, you?
18:48:06VarriountNope
18:48:12Varriount"HTML/CSS by bitowl"
18:48:15*Mat3 joined #nimrod
18:48:20Mat3hi all
18:48:34BitPuffinVarriount: and?
18:48:54Araqhi Mat3
18:48:54VarriountBitPuffin, it looks like you have a relative. :3
18:49:11BitPuffinaaaaaahhhhh :D
18:49:39BitPuffinMat3 is in our shaders, snatchin our vertices up
18:50:31BitPuffinVarriount: maybe he got inspired by my nick, I've been in #libgdb now and then
18:51:18Mat3hi Araq,Varriount,BitPuffin
18:52:05BitPuffingdx
18:52:37BitPuffinhey Mat3!
18:52:57BitPuffinI'm hungryyyyyyyy
18:53:05BitPuffinwaiting for my burger
18:53:13Mat3BitPuffin: Try to misuse GPU's for heavy vectored computations ? :D
18:53:31Mat3(with DirectX)
18:54:02BitPuffinMat3: hahaha. Well doing vector stuff on GPU is alright, but not with D3d :P
18:54:57BitPuffinbah
18:55:01Mat3it's possible however
18:55:14BitPuffincan't decide which notation I'm gonna use for shearing/skewing
18:55:42BitPuffinthey can take either one parameter or two
18:55:48BitPuffinMat3: of course but microsoft
18:57:07Mat3Araq: I vote for including MAP_ANON to the POSIX wrapper (for conventional misuse of mmap)
18:59:26Araqwell make a pull request
19:03:20BitPuffinI'll go with the 2 parameter one
19:04:00BitPuffinquestion is if I should call it shear or skew
19:04:39BitPuffinshear I think
19:05:36Mat3Araq: ok, I need to reactivate my GIT account for doing so ?
19:07:05Araqyeah
19:07:44Araqhi fundamental welcome
19:07:58*Araq keeps seeing new nicks
19:09:58BitPuffinburger!!!
19:12:11Mat3ciao, see you guys
19:12:14*Mat3 quit (Quit: Verlassend)
19:13:05*boydgreenfield joined #nimrod
19:18:05*tylere joined #nimrod
19:18:15tylereSo I'm getting a really confusing compiler error
19:18:21tylereso have this code: https://gist.github.com/tylereaves/7811511
19:18:31tylereprob001.nim(3, 20) Error: type mismatch: got (bool, bool)
19:18:50dom96Now the new record is 61. :)
19:18:53MFlamerWho was it here who was trying to use nimrod for embedded applications?
19:19:20MFlamerMaybe a special backend or minimal stdlib or something?
19:19:36dom96tylere: replace the "||" with "or"
19:19:43MFlamerwas that Mat3?
19:20:51tyleredom96: ahh, that works
19:21:07tyleredom96: I still might file an issue over it as that error message is very unhelpful
19:21:49tylerein particular, if the compiler sees a type mismatch it should imo always report both the _found_ type and the _expected_ type
19:22:05MFlamerThought it would be pretty cool to command this little chip with nimrod http://www.mouser.com/pdfdocs/INDP28495_Kinetis_L_Series_KL02_FSv4HR.pdf
19:22:12dom96tylere: Did it not list functions after that error?
19:22:43tyleredom96: nope
19:22:43tylerehttps://gist.github.com/tylereaves/7811582
19:22:48tylerethat's the entireity of compiler output
19:23:38dom96tylere: In that case I agree, it could definitely be improved.
19:26:17tylereI'll open a bug
19:27:24dom96tylere: thanks :)
19:34:31dom96I edited your formatting a bit
19:34:40*isenmann quit (Ping timeout: 264 seconds)
19:40:16*Hannibal_Smith joined #nimrod
19:48:53*MFlamer quit (Read error: Connection reset by peer)
19:50:13*MFlamer joined #nimrod
19:53:33Araqaha!
19:53:41BitPuffinsnoooooooooooooooooooooooooooooooooooooooooooow!!!!!
19:54:01AraqBitPuffin: think about your signal to noise ratio please
19:59:53Araqso ... when there is an internal error in the "compiles" context the compiler doesn't tell you the error message
20:00:03Araqfor obvious reasons
20:08:47VarriountAraq, sadly, I can't see the obvious reasons, what are they?
20:09:33BitPuffinping zahary_
20:09:58BitPuffinAraq: hm?
20:10:18AraqVarriount: 'compiles' is supposed to return false when it doesn't compile. error messages should not be emitted
20:10:40Araqwe use the holzhammer method to suppress the error messages
20:10:58BitPuffindoes the delegator pragma only work on procs? Because I want to do compile time evaluation :(
20:11:13VarriountDelegator pragma?
20:11:51BitPuffinhttp://build.nimrod-lang.org/docs/manual.html#delegator-pragma
20:11:53BitPuffinVarriount: ^
20:12:53VarriountOoh, interesting.
20:13:10*Varriount should really read the build version of the manual
20:16:44BitPuffinAraq: shouldn't a when statement work on a string{lit} parameter?
20:18:38Araqno
20:18:41Araqit shouldn't
20:18:53Araquse expr[string] for that
20:19:03Araqand I really hate expr[string]
20:19:10Araqit makes no sense
20:19:37Araqan expression of type "string" is obviously an expression
20:19:49Araqso what should expr[string] mean?
20:21:12*brson quit (Ping timeout: 240 seconds)
20:21:36BitPuffinAraq: dunno, I thought string{lit} would make sense in this case
20:22:26Araqwhy? string{lit} is a string literal, it doesn't make it generic so you can't look at the passed value
20:23:04BitPuffinAraq: who said anything about generics?
20:24:22Araqwell if you don't have an instantation per passed string literal how can a 'when' statement work?
20:25:14BitPuffinAraq: well it worked when it was a template
20:25:16BitPuffin Error: type mismatch: got (TVector[int, range 0..4(int)]) but expected 'expr[string]'
20:25:18BitPuffinwtf
20:25:25BitPuffinproc `()`[T, I](str: expr[string], vec: TVector[T, I]): expr {.delegator.} =
20:25:35BitPuffinassert vec3.rgbbg == [1, 3, 37, 37, 3]
20:28:20Araqwell of course it worked when it was a template
20:28:50*zielmicha1 joined #nimrod
20:28:56BitPuffin"The delegators can be any callable symbol type (procs, templates, macros) depending on the desired effect" um.. lies? delegator on a template yields invalid pragma
20:29:11Araqa template gives you the required instantiations
20:29:30Araqwhy is that hard to understand?
20:30:00*zielmicha quit (Ping timeout: 245 seconds)
20:30:28BitPuffinAraq: so when only works in generic contexts?
20:30:28AraqBitPuffin: ever thought that the feature is in development?
20:30:42BitPuffinAraq: yes it's what I'm thinking right now
20:30:51Araq'when' works when the expression can be evaluated at compile time
20:31:07BitPuffinAraq: yes and literals are known at compile time aren't they?
20:31:17Araqstring{lit} is not sufficient to provide a compile time context
20:31:33BitPuffinokay why not?
20:31:39Araqand now I'll leave you alone and think about it because I can only repeat myself
20:32:14BitPuffinwell
20:32:46BitPuffinI'm gonna take it as procs (except for generic parameters) aren't instantiated per argument so that's why it doesn't work
20:33:08BitPuffinbecause I guess it is the point of procs? :P
20:33:42VarriountBitPuffin, I'd be quiet if I were you, lest you get backhanded by Araq all the way to Pluto
20:34:17VarriountAnd I prefer my Puffins on Earth, thankyouverymuch
20:34:17BitPuffinVarriount: but I'm like eminem
20:34:50*zielmicha1 is now known as zielmicha
20:35:39*BitPuffin thinks there should be a deprecated pragma
20:36:03VarriountThere is. The compiler uses it.
20:38:18OrionPKMthere should also be some sort of importc pragma or something
20:40:18*Varriount slaps OrionPKM and BitPuffin around a bit with an electric mackeral
20:40:34BitPuffinOrionPKM: or a noSideEffects pragma
20:42:39BitPuffinAraq: think I found a bug :P
20:42:58BitPuffin/home/isak/src/nim/linagl/src/linagl/nimcache/linagl_vector.o: In function `vectorInit':
20:43:01BitPuffinlinagl_vector.c:(.text+0x1092): undefined reference to `swizzleimpl_90827'
20:43:36VarriountBitPuffin, are you dealing with nested procs/iterators?
20:43:42BitPuffinVarriount: no
20:43:54BitPuffinthis is just a compiletime proc being called from a template
20:44:11Araqwell you use a compiletime proc at runtime
20:44:19BitPuffinAraq: no I don't
20:44:39Araqwell report it then
20:44:47BitPuffinor at least not that I know of
20:44:56VarriountBitPuffin, if you use a compiletime proc in a template, doesn't the body the template passes use the proc?
20:45:05BitPuffinhttps://bitbucket.org/BitPuffin/linagl/src/fd8282dd461ee8082018e76715c0fcdf0316f014/src/linagl/vector.nim?at=default
20:45:08BitPuffindo you see anything?
20:45:43BitPuffinVarriount: probably not, otherwise there would be no point of compiletime procs?
20:46:33VarriountBitPuffin, do you have proof that the compiletime proc *runs* at compiletime?
20:46:41Varriountlike, an echo statement or something?
20:46:49BitPuffinVarriount: once upon a time it worked?
20:47:41VarriountBitPuffin, it sounds like the compiletime proc is being left in the template body, uncalled
20:49:16AraqBitPuffin: I don't think it ever worked
20:49:25AraqI remember that error message and your complaining
20:49:34BitPuffinAraq: it did, the unittests used to pass once upon a time
20:49:46VarriountBitPuffin, did you comment out some tests?
20:49:49BitPuffinAraq: Well sure it looks familiar, but I know it used to work
20:50:33VarriountInstead of complaining, debug it.
20:50:48BitPuffindo I look like I have time for that
20:50:53BitPuffinI'm way behind my schedule
20:50:57VarriountYou have time to complain about it.
20:51:45VarriountTurn on linedir -> open up c file that throws the error -> find the erroneous line -> put in bug report
20:51:59BitPuffinwelp
20:52:04BitPuffinmaybe by the end of the year
20:52:11Varriount-_-
20:52:30BitPuffinVarriount: complaining about it is quick and at least gets it on the radar
20:52:35BitPuffindebugging takes years
20:52:49VarriountBitPuffin, putting it in a bug report gets it on the radar
20:52:57*MFlamer quit (Ping timeout: 252 seconds)
20:53:42BitPuffinVarriount: okay I'll throw together the lamest bug report ever then
20:54:11VarriountWhich I will then probably update with more info. Sigh.
20:57:01*radsoc joined #nimrod
20:59:00BitPuffinhttps://github.com/Araq/Nimrod/issues/711 there Varriount
20:59:11*Durz0 quit (Quit: WeeChat 0.4.0)
20:59:31*MFlamer joined #nimrod
21:03:39VarriountOdd, I would've expected gcc's semantic checking to catch that.
21:08:08VarriountBitPuffin, why does that procedure need to be called at compile time?
21:08:44*tylere quit (Remote host closed the connection)
21:08:46VarriountAnd if you say, "for speed" I will swim all the way over to Great Britain, find you, and give you a smack upside the head.
21:08:57BitPuffinVarriount: for speed
21:09:06*BitPuffin is not in the UK so it's safe
21:09:34BitPuffinVarriount: no but do you mean the whole template and everything or just that proc?
21:09:49VarriountJust that proc
21:10:51Araqwell it should always be done at compile time, so that pragma is fine
21:11:03*brson joined #nimrod
21:11:05Araqno idea why the compiler is too stupid to not eval it at compile time
21:11:20BitPuffinVarriount: right, because I want it to be a compile time error
21:11:25Araqhi radsoc welcome
21:11:36BitPuffinwhen you specify a char that is not valid
21:11:46BitPuffininstead of a crash
21:11:49radsochi Araq thanks
21:12:21BitPuffinI guess it already is
21:12:34BitPuffinbut it's unecessary to do the thing at runtime I think
21:13:08VarriountBitPuffin, don't arrays need instanciation when they are arguments?
21:15:02BitPuffinVarriount: guess that depends? this template returns an expr and doesn't modify the array
21:15:23VarriountBut in the swizzleImp proc
21:16:00BitPuffinVarriount: since when does swizzleImpl take an array as an argument
21:16:12BitPuffinwell unless you count the string
21:16:15VarriountNo, but it returns one.
21:16:33BitPuffinand?
21:16:50BitPuffinreally though EXetoC wrote this when I couldn't :P
21:16:53Varriountdon't you have to do new(result)? or is that only for complex types/objects?
21:17:07BitPuffinVarriount: nah I don't think so
21:18:10AraqVarriount: new(result) is only for 'ref'
21:18:28VarriountAh, ok.
21:18:33MFlamerAraq: who was it here who was using nimrod for imbedded applications?
21:18:42MFlamerembedded*
21:18:43BitPuffinI think Araq would have yelled by now if the code was wrong Varriount
21:18:57BitPuffinand I'm certain it worked
21:19:02BitPuffinlike 99%
21:19:10AraqMFlamer: mat3 and some others who don't hang around here
21:19:11VarriountBitPuffin, yeah, but If I see something I don't understand, I ask how it works.
21:19:11BitPuffinEXetoC can verify
21:19:18VarriountThat's how I learn things.
21:19:21BitPuffinVarriount: ah gotcha
21:19:44VarriountBitPuffin, I have a solution
21:19:54MFlamerok, thanks
21:19:57Varriountremove the compiletime pragma. :3
21:20:03BitPuffinVarriount: never
21:21:00BitPuffinno code should be generated for that proc
21:21:13BitPuffinit's only intended to be a helper for swizzling
21:22:20VarriountYou can either spend the time coming up with a real fix, or patch it. Or, of course, have broken code :D
21:23:10BitPuffinVarriount: Well for now I'll leave it broken since I probably won't use swizzling much anyway because I can't get the proper syntax to work
21:23:22BitPuffinas you can see it is deprecated because of that
21:23:35*isenmann joined #nimrod
21:23:37BitPuffinand since it's an error in the compiler it will eventually get fixed
21:23:45VarriountI've heard the term before, but what is swizzling?
21:24:15BitPuffinv.xyzyzzzyyzyyzyzyyyzz
21:27:20*shodan45 joined #nimrod
21:27:50dom96New record!
21:27:53Araqdom96: is ...
21:27:58dom96hello isenmann
21:28:01Araqha! was about to ask
21:28:19BitPuffindom96: hahaha man you are sitting there like a hawk, not saying anything, just staring at the numbers
21:28:41Araqwell he needs to enter the numbers every 108 minutes
21:28:44BitPuffindom96: no go update NimBot to do this for you instead of having to keep count :P
21:28:49dom964 8 15 16 23 42
21:28:53dom96Execute
21:28:58BitPuffindom96 is stanley
21:29:03*dom96 is Desmond
21:29:09BitPuffindom96 is dead
21:29:11BitPuffinwhat
21:29:40BitPuffinwoa holy fuck
21:29:46dom96Araq: I'm liking these Lost references from you heh
21:29:57BitPuffinthe lamps keep on twitching
21:29:59Araqdom96: seems nobody else does
21:30:05BitPuffinoh it's currently a storm btw
21:30:06Araq;-)
21:30:08BitPuffinso if I die
21:30:13BitPuffinyou heard it first
21:30:24shodan45how is the javascript target (backend?) coming along?
21:30:27dom96BitPuffin: Nooooo, you can't :(
21:30:56BitPuffindom96: oh right! I'm immortal!
21:30:56dom96shodan45: I don't think it's currently the top priority so it's not really being worked on.
21:31:53Araqshodan45: I consider it "quite stable". I don't think there is much (if any) production code using it though.
21:32:25dom96What we need is to get the tester to run JS tests.
21:32:39BitPuffinprobably because the dom module is from the rennaisance
21:32:39VarriountAnd generate documentation.
21:32:42dom96But first nimbuild is in need of improvement...
21:32:54Varriount*looks at dom96*
21:33:08Araqwell I did run quite some tests and it worked quite well
21:33:09shodan45dom96, Araq: I ask because the recent Scala.js stuff looks *very* tempting ;)
21:33:34BitPuffinshodan45: even for an AI?
21:33:36Araqshodan45: no! please stay! if you encounter bugs they are in general trivial to fix
21:33:44dom96shodan45: reactormonk probably has the most experience with the JS backend. AFAIK he didn't run into any problems.
21:33:59BitPuffinAraq: but the dom module.. THE DOM MODULE
21:34:05shodan45link, fyi: http://www.scala-js.org/
21:34:22reactormonkshodan45, didn't use too much
21:34:38VarriountBitPuffin, call me a simpleton if you must, but what does this do exactly/meant to do? -> "0.. <str.len"
21:34:53shodan45it's really the JS interoperability that intrigues me
21:35:04dom96Varriount: It's the same as: 0 .. str.len-1
21:35:05reactormonkshodan45, you can get the same with nimrod
21:35:15BitPuffinVarriount: I think it does 0..str.len-1
21:35:24VarriountSo, it produces a range type?
21:35:26BitPuffindom96: shh
21:35:30reactormonkthe only nasty stuff is that nimrod wants you to use types, so you'll have to write them yourself. I used some ruby scripts to convert from doxygen to JS
21:35:36Araqshodan45: "ArrayIndexOutOfBoundsException are not checked" well they are in Nimrod even for the JS backend
21:35:57BitPuffinSMACK BOOM BANG!!! ARAQ IS ON FIRE!!
21:35:59reactormonkshodan45, https://github.com/reactormonk/nim-kwin
21:36:26BitPuffinyes I am overworked
21:36:34dom96shodan45: It seems that scala.js is even less stable than Nimrod's JS backend. They do say that it is still experimental.
21:37:16Araqand not supported by TypeState so it's not "official"
21:37:27BitPuffinthat's what came to my mind too dom96, it's like we're twins
21:38:07shodan45reactormonk: uhhh holy wtf, are those bindings (is that the right word?) to script KDE's KWin's JS stuff?
21:38:16dom96BitPuffin: That's all the evidence I need. We are now twins!
21:38:23BitPuffindom96: yay!
21:39:12dom96BitPuffin: Now transfer your OpenGL knowledge to me through our secret twin telepathic link.
21:39:14EXetoCVarriount: see the definition of `..` and ´<´ in system.nim
21:39:24VarriountBitPuffin, ok, this is odd. static: echo(repr(type(0.. <str.len))) produces "int", yet "static: echo(repr(0.. <str.len))" produces (0, 4)
21:39:40EXetoCVarriount: < is syntactic sugar for -1, and .. constructs a TSlice[Type]
21:40:05BitPuffindom96: but it's encrypted and I lost the key
21:40:08*faassen left #nimrod (#nimrod)
21:40:23EXetoCactually, there's also a `..` iterator rather than proc, which is why it works in conjunction with 'for'
21:40:40dom96BitPuffin: Damn. Just need to brute force it then.
21:40:51BitPuffindom96: yeah it is currently transferring
21:41:17VarriountEXetoC, then why is the type 'int' and not 'TRange[int]'?
21:41:29BitPuffindom96: it's probably gonna take a while though, but system is pretty overloaded
21:41:32BitPuffinmy*
21:42:02BitPuffinplus my TTIC is a very old one
21:42:15EXetoCVarriount: I don't know
21:42:16dom96Your TTIC? lol
21:42:43BitPuffindom96: My Twin Telepathic Interface Controller
21:42:44reactormonkshodan45, yup
21:43:09boydgreenfieldQuick question: How do folks recommend doing run-time timing/profiling? I just realized getTime() rounds to the nearest second... (right?)
21:43:11dom96BitPuffin: I have the latest one from Microsoft. I hope they kept backwards compatibility.
21:43:19*dom96 thinks we should stop lol
21:43:29shodan45reactormonk: wow?
21:43:39EXetoCVarriount: I've never seen it evaluate to int though, because I've never gotten any strange related error
21:43:44BitPuffindom96: mine is an old DOS one, but it's compatible with FreeDOS
21:43:48BitPuffinmaybe :D
21:43:50EXetoCmaybe some bug is triggered in that expression. just a guess
21:43:55boydgreenfieldepochTime?
21:44:00shodan45reactormonk: something like that exist for jquery or similar?
21:44:15Araqboydgreenfield: cpuTime?
21:44:35AraqI mostly use linux's time command
21:44:45boydgreenfieldOk cpuTime. Perfect, thanks!
21:44:54boydgreenfieldWrapping up that Bloom filter I mentioned last week...
21:45:04boydgreenfield(Using a sequence of int8s at the moment though...)
21:45:17Araquse a sequence of uint or int
21:45:42Araqit's faster and not more effort
21:46:24VarriountBut not as memory conservative?
21:46:37reactormonkshodan45, probably. Grab a scripting language of your choice, a html parser, the jquery api and a bit of patience
21:47:07VarriountEXetoC, probably because I'm using static or something.
21:48:05AraqVarriount: 8 bytes vs 1 byte that will be aligned ... shouldn't matter at all
21:48:31shodan45reactormonk: interesting...
21:48:33reactormonkshodan45, or ask me again in a week and I'll take a look
21:49:02boydgreenfieldAraq/Varriount: I'll look to swap it out in a bit then – just requires changes to the bit math
21:49:23shodan45reactormonk: what about creating multiple JS files? something kinda sorta like libraries?
21:49:36Araqyeah, you need to replace 8 by 8*sizeof(int) ;-)
21:49:48shodan45reactormonk: or does it not still create 1 big JS file?
21:50:17Araqit creates 1 big JS file, but that is common for distribution anyway so JS engines can deal with it
21:50:35boydgreenfieldAraq: Well, I had a const for my 8 bit positions, but will do those on the fly at variable/64-bit ints
21:50:59Araqnah it's still known at compile time, boydgreenfield
21:51:15Araqit's just that you don't know sizeof(int), the compiler knows
21:51:16reactormonkshodan45, you working with emacs?
21:52:04Araqboydgreenfield: please post some results and I'm interested in your implementation too. My new GC is likely to use a bloom filter for stack marking
21:52:42boydgreenfieldAraq: Will do shortly. It's not optimized at all... and I'd also love some feedback on writing more idiomatic Nimrod (I'm bastardizing it into Python I suspect)
21:53:14shodan45reactormonk: no... not working with anything at all yet :)
21:54:21reactormonkshodan45, what's your editor of choice?
21:54:50EXetoCnotepad?
21:55:51shodan45reactormonk: I've recently fallen in love with JetBrains' IDEs... but that would take a bit of effort to get working I think. Other than that, I just use Kate or Kwrite.
21:59:40reactormonkshodan45, go with vim/emacs/sublime/something
21:59:58reactormonkI suppose there won't be any JB for nimrod in the near future
22:00:08boydgreenfieldAraq: Well, that was painless. I'll paste the github link in a second.
22:00:20VarriountBitPuffin, EXetoC, so, am I getting this right: You are passing '0.. <str.len', which creates a concrete TSlice, as a generic parameter to SwizzleImpl, which then uses that generic parameter as the index slice for it's array return type
22:00:29boydgreenfield(looks to be 15% slower with ints?)
22:00:56OrionPKMthe ST plugin is getting some lovin now
22:01:03OrionPKMor rather, a new one is :)
22:01:09OrionPKMit's not in the package control yet though
22:01:15shodan45reactormonk: the java & python versions are open source, and there's several free plugins for unsupported languages, so it's certainly doable
22:01:26VarriountOrionPKM, I just added typedesc as a builtin type.
22:01:52OrionPKMcool
22:02:19OrionPKMdid you commit it?
22:02:35boydgreenfieldAraq: link is here https://github.com/boydgreenfield/nimrod-bloom
22:03:23OrionPKMVarriount I added TODO comment highlight
22:03:33EXetoCVarriount: I don't even remember much about that :p
22:03:38EXetoCwill look into it soon
22:04:15OrionPKMVarriount I'm going to try to switch to CAAS some time this weekend
22:04:29OrionPKMfor the idetools calls
22:04:50OrionPKMsome snippets would be nice as well
22:04:53VarriountI'm gonna try to get some more syntax highlighting stuff done.
22:05:00OrionPKMwhat's left?
22:05:06OrionPKMI really wish we could do tooltips :(
22:05:15VarriountOrionPKM, mainly complex stuff
22:05:34Varriountprocedure declarations and bodies
22:05:34OrionPKMI was thinking it might be nice if pragmas stood out a bit..
22:05:39VarriountPragmas
22:05:57EXetoCVarriount: ok which line?
22:06:03VarriountAs a side note, the python syntax file is a good base.
22:06:30OrionPKMwhatever we're using right now is a good base, that yaml file is nice and clean
22:06:32VarriountEXetoC, in the code BitPuffin pasted, line 32
22:08:17radsocMFlamer: Hi, I tried lockfreehash yesterday but had a problem at compile time : lockfreehash.nim(23, 18) Error: type mismatch. The line 23 is: TRaw = range[0..4611686018427387903]. It's strange because if I create a .nim with range[0..(high(int) div 2)], it works :is not 4611686018427387903 interpreted as an int? is there any workaround ? (without rebuild)
22:08:46EXetoCVarriount: this might clarify: array[0..5, int] (from the manual) means that the array is indexed from 0 to 5, so it has 6 elements
22:09:00MFlamerHi radsoc
22:09:22EXetoCso if specifying a swizzle like this: xxyzzzxz, then what you get is an 8-dimensional vector
22:11:02*BitPuffin quit (Ping timeout: 264 seconds)
22:11:04MFlamerradsoc: you are trying as 64bit. I was getting that same problem, when I wrote it. Unfortunatly it may only work as 32bit right now
22:11:15reactormonkshodan45, go for it
22:11:28MFlamerWill 32bit work for you?
22:11:39EXetoCso, if the original input vector is [2, 6, 1], then the above swizzle will generate [2, 2, 6, 1, 1, 1, 2, 1]
22:11:55EXetoCI don't know if you got the concept, but perhaps you understand the actual implementation now
22:12:04*hoverbear joined #nimrod
22:12:36*Hannibal_Smith quit (Quit: Sto andando via)
22:13:25*zielmicha quit (Read error: No route to host)
22:14:53VarriountEXetoC, yes, I know
22:15:34*BitPuffin joined #nimrod
22:15:46MFlamerradsoc: so, maybe my range is too big. That may fix this issue, but I would have to add a few more things to support 64 bit. I might be able to get to it tonight if you need it
22:15:50radsocMFlamer: well, unfortunately no... do you think (high(int) div 2) could be OK?
22:15:52EXetoCVarriount: ok so the answer to your question is simply yes
22:16:37radsocMFlamer: please, don't work at night for me!
22:17:15shodan45reactormonk: weekend project... maybe ;)
22:17:38MFlamerthe hashing function and a few other things are set up only for 32bit ptrs as of now. We need the table to get finished anyway.....or this will just come up again
22:17:49*zielmicha joined #nimrod
22:19:02radsocMFlamer: I really can wait some days
22:19:38reactormonkshodan45, more than that
22:19:46MFlamerradsoc: OK, well I'll post on the forum when I get to it.
22:20:04Araqboydgreenfield: your nimrod code is actually quite idiomatic
22:20:36Araqthe 'var' declarations at the top of the proc body are unnecessary though. Nimrod is not pascal.
22:20:49radsocMFlamer: OK, thanks!
22:21:00Araqjust do: var/let hash_set = bf.hash(item)
22:21:16boydgreenfieldAraq: Thanks! And good to know... I also have a lot of snake_case and I wasn't sure what the best way to handle optional params is (or import/from statements, for that matter)
22:21:24AraqMFlamer: please get to it :P
22:21:44Araqwe need this concurrent hash table in a working state
22:21:57MFlamerOK
22:23:52Araqgod, I hate our test suite. It's full of hard cases ...
22:24:16boydgreenfieldAraq: When is it appropriate to include the var at the top of the proc? For variables being redefined in a loop is it preferable to include var above or within the loop itself?
22:24:36boydgreenfield(and if/else paths seem to raise compiler hints/warnings?)
22:24:44VarriountAraq, hard cases?
22:25:11AraqVarriount: it's like somebody added every hard to support case to our test suite
22:25:11radsocgood night
22:25:16*radsoc quit (Remote host closed the connection)
22:25:36MFlamergoodnight radsoc
22:25:59VarriountAraq, probably because each test case was born out of a bug report.
22:26:28Araqboydgreenfield: just use 'let v = expr' whenever possible. If not possible try 'var' and if that's not possible try to declare it in an outer scope
22:26:43boydgreenfieldAraq: Got it. Thx.
22:27:48AraqVarriount: believe it or not, it's often also 'cause we know how to write tests ...
22:30:53shodan45reactormonk: to get something like a browser's alert() function imported into nimrod, I'd just need '{.importc: "alert"}' after the nimrod proc signature, right?
22:31:10reactormonkshodan45, yup, check kwin-nim ;-)
22:33:02shodan45reactormonk: very cool
22:34:03OrionPKMwouldnt you just need {.nodecl.}?
22:36:35AraqOrionPKM: 'nodecl' wouldn't prevent name mangling
22:37:04OrionPKMah.. in the manual you dont use it on printf
22:37:12OrionPKMerm, importc
22:37:51Araq'nodecl' got more error prone btw because now nimbase.h doesn't import stdio etc. anymore
22:38:08Araqso you end up having no header at all in the generated C
22:38:19OrionPKMimportc without a string uses the function name, right?
22:38:21Araqso be careful with 'nodecl', 'nodecl' is a hack anyway
22:38:25Araqright.
22:38:25OrionPKMok
22:41:40BitPuffinnelson mandela died
22:42:11VarriountAraq, is there anything... special about the type of '1..5'?
22:42:27BitPuffinhttp://www.nytimes.com/2013/12/06/world/africa/nelson-mandela_obit.html?hp&_r=0
22:42:37AraqVarriount: yes. it's highly ambiguous
22:43:08Araqit's either a TSlice or a range, depending on the context
22:50:04*brson quit (Read error: Connection reset by peer)
22:50:45*brson joined #nimrod
22:52:08*XAMPP_ joined #nimrod
22:53:38*XAMPP quit (Ping timeout: 264 seconds)
22:55:47VarriountAraq, so, why is it that you can call a generic function like foo[1..4](intSeq), but not foo[TSlice[int](1,4)](intSeq)?
22:56:12EXetoC"proc `..` ..."
22:56:18VarriountEr, TSlice[int](a:1,b:4)
22:56:50EXetoCthat proc constructs a slice
22:57:13VarriountEXetoC, one of the forms of `..` And an arrays first arguments accepts?
22:57:50AraqVarriount: why is it? complexity breeds bugs. That's why.
22:58:57VarriountSo.. a `..` in a generic parameter is a special case then?
22:59:11*dymk quit (Ping timeout: 246 seconds)
22:59:18EXetoCyou should be able to construct a TSlice explicitly
23:00:02EXetoCif not, then you're doing something wrong. or maybe it's not possible when dealing with array and range, but they would be special cases then
23:00:43VarriountEXetoC, https://gist.github.com/Varriount/7815593
23:03:42*dirkk0 quit (Quit: Leaving)
23:04:55*dymk joined #nimrod
23:06:47EXetoCI think I misread. Araq: so it has actually been explicitly disallowed for type parameters?
23:07:17EXetoCbecause "var x = TSlice[int](a: 1, b: 5)" works
23:08:14EXetoCI'm making no sense as always
23:09:18VarriountEXetoC, I can explicitly *instantiate* TSlices, but I can't use them in generic parameters. But I can use `..` in generic parameters, despite `..` returning a TSlice.
23:09:40EXetoCVarriount: it's simply a special case, as it is when doing array[0..1, int] or range[0..1]
23:10:50EXetoCso .. is indeed handled in a special way in some cases, so it's not just a proc and an iterator defined in system.nim
23:11:56*Varriount is adding this to his proposal
23:15:40EXetoCadding what?
23:16:25VarriountThis inconsistancy
23:17:56VarriountEXetoC, you may or may not recall that, a couple weeks ago, I proposed that generic argument syntax should eventually be changed into partial argument instanciation
23:19:08VarriountBecause of all the little differences between generic procedures, and procedures with arguments that have a type of typedesc
23:23:38*travisbrady quit (Ping timeout: 240 seconds)
23:26:16BitPuffindom96: probably not gonna get a screenshot tonight :P
23:26:22dom96:(
23:26:32dom96Give us one anyway!
23:26:33BitPuffinsince I need to shower soon
23:26:38BitPuffindom96: nein!
23:26:51BitPuffinunless you want a black screen ofc
23:26:58BitPuffinterrain comes first :P
23:27:08dom96lol ok
23:27:10BitPuffinand I'm trying to decide what way to do it right
23:27:23EXetoCcome on, just show us one triangle
23:27:40BitPuffinEXetoC: you can save the day by showing your quad
23:28:55EXetoCthree quads even
23:30:33BitPuffinokay
23:30:36BitPuffinuploading screenshot
23:30:45Varriount:O
23:30:51dom96:O
23:30:56BitPuffinhttp://www.pasteall.org/pic/show.php?id=63600
23:32:35VarriountHey, I play that game all the time!
23:32:44EXetoCcolor terminal? neat
23:33:10OrionPKMyuy
23:33:11BitPuffinEXetoC: I dunno it's just rxvt-unicode, weechat presented the colors :s :D
23:33:30BitPuffinshit my computer is dying!! no battery!!
23:33:44BitPuffinas you can see in the pic :P
23:36:28*zielmicha quit (Ping timeout: 246 seconds)
23:37:49VarriountBitPuffin, and, you have no connection?
23:37:59VarriountW:Down, E:Down
23:38:02BitPuffinVarriount: apparently not
23:38:12BitPuffinthe no battery part is actually true
23:38:13dom96Well I'm away to sleep.
23:38:14dom96Bye
23:38:16BitPuffinthere is no battery on my laptop
23:38:20BitPuffindom96: night!
23:38:27BitPuffins/on/in
23:38:37VarriountBitPuffin, what happens if the plug falls out?
23:38:46BitPuffinVarriount: the laptop dies
23:39:01VarriountWhy don't you have a battery?
23:39:06BitPuffinbecause it died
23:39:12Varriount?
23:39:17BitPuffinlike the monday before this one
23:39:20BitPuffinor was it this one?
23:39:28BitPuffinthink it was the monday before last
23:39:35VarriountNah, it's next monday you're thinking about
23:39:39BitPuffinhaha
23:39:41BitPuffinofc
23:39:48BitPuffinno but seriously
23:39:54BitPuffinit just stopped working out of the blue
23:39:57BitPuffinfucking annoying
23:40:31BitPuffinit died the 25th of november
23:40:43EXetoCthis year?
23:40:56BitPuffinEXetoC: no during the rennaisance
23:40:59BitPuffinyes this year
23:46:23BitPuffinEXetoC: I'm guessing you draw your quads using a triangle strip? :P
23:47:32shodan45BitPuffin: generally, batteries don't just "die" - check for broken contacts, etc.
23:48:05EXetoCBitPuffin: points
23:48:26EXetoCactually no, tri strips
23:48:36*jimmt is now known as jennjimm
23:48:50BitPuffinEXetoC: haha points :P
23:48:54EXetoCc(:)
23:49:14BitPuffinshodan45: they look just fine
23:51:06BitPuffinshodan45: but when I put it in it just says charging forever and the battery symbol lamp thing blinks red