<< 05-03-2014 >>

00:00:15fowlhows that o.o
00:00:37Demostype erasure is whenever you cast something in such a way that the type goes away, you then need to store the type someplace else and access it at runtime
00:01:05zahary1we are reducing the difference in types to a common "vtable" type; the "component info" objects are another example
00:01:19zahary1I don't remember the specific names, sorry
00:03:20zahary1but an ECS without any type erasure doesn't sound like such a worthy goal - you should check-out the convenient syntax of the fowl library
00:03:33Demosmy syntax is almost the same
00:03:49DemosI do use type erasure for my systems
00:03:49fowlDemos, wheres the entity's data stored
00:03:55zahary1I imagine that you obtain direct pointers to the components you want to work with?
00:04:09zahary1you have a way to get an component and then you directly work with it?
00:04:18Demosin an array of components. And yeah I do
00:04:48fowlis it like a seq[component_a] where the index is the entity ID?
00:05:48Demosmore or less, the index is not the entity id thouhg, you need to search to get a component belonging to a specific entity. By garenteeing that components are at least ordered by entity you can do that very quickly
00:06:09SkrylarSorry to interrupt for a second; are there any one-line concepts/annoyances people have with GUIs they think I should look at in a minute? I'm combing concepts for a nimrod GUI at the moment and wanted to make sure i didn't miss something important
00:06:25Demostoo much magic
00:06:55fowlSkrylar, tree-based widgets are a PITA to update
00:08:19flaviuAraq: Looking through TAPL, what nimrod calls tuples are actually records. If I'm reading figure 11-7 correctly (might be wrong, the notation is slightly confusing), they are supposed to work more-or-less how I'm trying to describe them
00:08:24zahary1well, one nice thing about fowl's design and type erasure in general is that you don't need to know which component will handle a specific message - you can have different implementations responsible for the same external interface - you can even have what we call "multicast" messages, which can be implemented by several components simultaneously - these come in very handy in the design of game engines
00:08:55fowlDemos, i see. in entitty the component data is stored continuously like [compA, compB, compD] (a cstring) the typeinfo has an offsets field so cast[ptr component](entity.data[ entity.typeinfo.offsets[ component.id ] ].addr)
00:10:05Demosyeah I dont even have messages. you can register a function to run every update and from there you can fetch the components you need and go wild
00:12:31fowlDemos, from what ive seen in systems where theres no logic tied to the component, its common to use multiple systems to manage the game logic
00:12:44Demosyeah, ofc
00:13:08DemosI may well build a more type-erasure heavy thing on top of this
00:13:14Demosmaybe even stick a scripting language in there
00:13:16fowlrender system, physics system, etc, i ended up using this in roids, render system has a spatial partitioning for render culling, physics system has a chipmunk space
00:13:30Araqflaviu: the type of {x=5} is {x: Nat}, so the label is clearly part of the type
00:14:17Skrylarfowl: what in particular about a tree GUI do you have troubles with?
00:14:24Demosyeah systems are not really tied to the component representation
00:14:35Demosthey are just proc(scene: int)
00:18:58Araqforeach i, Gamma |- t_i : T_i ---> Gamma |- {l_i= t_i} : {l_i : T_i}
00:19:15*Araq needs a unicode keyboard
00:19:31SkrylarLaTeX IMEs
00:19:33Skrylarlol
00:20:54flaviuhttp://latex.codecogs.com/gif.latex?\text{foreach}%20~%20i%2C%20\Gamma%20|-%20t_i%20%3A%20T_i%20\to%20\Gamma%20|-%20{l_i%3D%20t_i}%20%3A%20{l_i%20%3A%20T_i}
00:21:56Araqflaviu: the labels are clearly taken over to the inferred type
00:22:12Araqyour rule would be:
00:22:20Araqforeach i, Gamma |- t_i : T_i ---> Gamma |- {l_i= t_i} : {T_i}
00:23:38flaviuMy bad then, but IMO, having the names be aliases is more intuitive. I'll see if I get a better argument together on the fourms.
00:23:53Araqha, very well
00:25:37AraqTAPL argues the order shouldn't matter though when you have field names
00:26:29SkrylarCEGUI does this interesting idea where their sizes are made up of two floats; there's a 'relative' and 'absolute' float which lets you do strethcy interfaces without layout managers. I think its neat but it involves doubling the size of coordinates and involves extra math
00:26:40Skrylar(parent.whatever*relative)+absolute
00:26:41Araqearly versions of the language tried to do this but I found it too tedious to implement for questionable gains in flexibility
00:27:33renesacwhat if the tuple field names that you define at the top of function aren't narrowing what you accept, but instead just telling what you want to name them inside your function
00:27:33renesac?
00:29:29*carum joined #nimrod
00:29:44Araqwell that's flaviu's argument, renesac
00:30:39Araqand I don't mind too much to change this, would also simplify the implementation a bit
00:30:55flaviuAraq: Your abstraction is aready leaky :P
00:32:04*darkf joined #nimrod
00:32:04flaviutype TNotARecord = tuple[a: int, b: string]; let t1: TNotARecord = (1, "t")
00:32:04flaviut1[0], t1[1]
00:32:44flaviuOrder can matter, it doesn't disappear
00:32:59flaviuOr maybe I'm becoming confused by the notation again
00:33:20Araqfor nimrod's tuples/records order does matter, yes
00:34:59*carum quit (Remote host closed the connection)
00:39:19*carum joined #nimrod
00:41:21fowlcan you get the exception backtrace if you catch it
00:42:19Araqyeah, getStackTrace(e) iirc
00:42:40Araqonly works in debug mode ofc
00:45:57VarriountMeep
00:46:29fowlty
00:52:59Skrylari'm starting to see the value in multithreaded forum software
00:53:00*carum quit (Remote host closed the connection)
00:53:38Skrylarits a lot easier to track multiple sub-conversations under a topic with the way reddit/slashdot does it
01:03:35*carum joined #nimrod
01:15:21NimBotAraq/Nimrod devel 90e1195 Araq [+1 ±4 -0]: fixes #937
01:15:21NimBotAraq/Nimrod devel 331f066 Araq [+1 ±0 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
01:15:28Demosseqs have reference semantics right?
01:15:48Araqzahary1: with this patch tstaticprintseq works
01:15:52flaviuDemos: Was just looking at the docs a second ago, it appears so
01:16:04Araqno, they have value semantics
01:16:18Araqthough you can do 'shallowCopy' and get ref semanticss
01:16:30Demoshot damn that would be why my var return type is failing
01:16:43Araqand often the compiler produces a move instead of a copy
01:16:52Araqbut it could always be smarter ofc
01:17:03Araqgood night
01:17:32flaviuI have another stupid question: How do I set stuff in a table?
01:18:27EXetoCmget/`[]`?
01:18:28Demosis there a way to use something like that proc infix, like how haskell has `...`?
01:18:40EXetoClolwut mget? :p
01:21:24Araqtab[key] = val
01:21:33*carum quit (Remote host closed the connection)
01:21:42EXetoC* `[]=`
01:22:22flaviuError: value returned by statement has to be discarded
01:23:43EXetoCuse index assignment if you don't care about existing values
01:24:24EXetoCor if said key isn't present
01:24:54Araqgood night
01:25:02EXetoCcya
01:26:32EXetoCmget returns a var that is referring to the value represented by said key, hence why it must either be stored or discarded (discard mget(...))
01:29:39flaviuThere seem to be all sorts of issues when doing things inside a (...) block
01:30:28flaviumove it out, and everything works as expected
01:30:50*DAddYE quit (Remote host closed the connection)
01:31:26*DAddYE joined #nimrod
01:31:49EXetoCI tend to use it only in block conditions
01:33:40EXetoCkeep in mind that many statements can be used as expressions, and so that can be used for various shortcuts
01:34:00EXetoClet x = if true: 1 else: 0
01:34:16flaviuEXetoC: Yep, I noticed that
01:35:03flaviuI'm coming from scala, were the situation is the same, though block expressions don't have odd beheivor.
01:36:10*DAddYE quit (Ping timeout: 265 seconds)
01:37:26*carum joined #nimrod
01:41:13Demosoh my god I just found advances.realtimerendering.com .... so much shiny
01:43:25VarriountDemos: Again, what is is with programmers and website design?
01:43:29Varriount*is it
01:43:58Demoshttp://motherfuckingwebsite.com/
01:44:08EXetoCcontent, bitch!
01:44:16flaviu+1
01:44:20VarriountDemos: Desn't excuse lack of aesthetic.
01:44:31Varriount*Doesn't
01:44:35Demosread the source for that website
01:44:38flaviuMaybe they put all their aesthetic into cool games
01:44:57DemosI like it. it is clear and has what I nead. Looks fine to me
01:47:10VarriountDemos: Did you look at the source?
01:47:20flaviuVarriount: Better than the website that I found a while ago that puts the cpu at full blast rendering a stupid little 3d wireframe cube
01:47:44Varriountflaviu: The website was created with Microsoft Office. MICROSOFT OFFICE
01:48:21DemosI mean the source for http://motherfuckingwebsite.com/
01:48:24flaviu... ... lol
01:48:46Demoswell it was probably something for siggraph that he had to put on the web or something....
01:49:03Demosgraphics people are not artists
01:49:37*carum quit (Remote host closed the connection)
01:49:38EXetoCnot graphics programmers anyway
01:49:53flaviuWow, thats pretty insane. But it is made by someone with a yahoo email, so it might be just a non-technical organizer or something
02:00:20Demosnope Natalya Tatarchuk works at bungie as a rendering engeneer
02:04:58Skrylari forget; can you do a renamed import on a whole module?
02:06:39EXetoCimport x as y?
02:08:25Skrylari'll have to test that
02:10:21*OrionPK joined #nimrod
02:23:41VarriountOk. I must be doing something wrong, as any opengl procedure I call immediately causes a null pointer error.
02:24:29VarriountI've been told by the tutorial to call glewInit, however the opengl wrapper doesn't have that. What do I do?
02:24:36Skrylarif you're using a wrapper you have to have it initialie everything
02:24:46Skrylarthe method to do that depends on what you're using
02:25:15Skrylarusually what you are calling are method pointers so if you haven't initialized the wrapper, you're just calling a null pointer
02:25:16VarriountSkrylar: glGenVertexArrays
02:25:27Skrylarthat isn't a loader
02:25:39SkrylarglewInit only applies if you are using GLEW
02:27:57VarriountOk, got it.
02:28:12Demosgaaaah I really need to remember that nimrod does not have sfinae
02:29:40EXetoCloadExtensions isn't enough? I can't remember
02:31:07*carum joined #nimrod
02:31:12VarriountEXetoC: It is. I mis-remembered. I thought that earlier, when I tried calling it, loadExtensions didn't work.
02:31:25*flaviu quit (Remote host closed the connection)
02:33:51*carum quit (Remote host closed the connection)
02:35:02EXetoCVarriount: A linker error because of the lack of referenced extension functions was it?
02:35:48EXetoCwhat are you using for window management?
02:35:54VarriountEXetoC: glfw
02:36:00VarriountBut it works now. :/
02:36:26EXetoCok
02:36:29EXetoCmy wrapper?
02:36:40VarriountEXetoC: Yep.
02:36:54EXetoCwoohoo. fame
02:36:58*DAddYE joined #nimrod
02:37:40VarriountEXetoC: I'm actually using the wrapper.nim file, since I'm following the tutorial
02:37:47*carum joined #nimrod
02:38:01Varriount'import wrapper as glfw'
02:39:00*q66 quit (Quit: Leaving)
02:39:19*carum quit (Remote host closed the connection)
02:40:19Skrylarhrm.
02:40:22EXetoCok. I should rename it because of how symbols are qualified
02:41:29*DAddYE quit (Ping timeout: 240 seconds)
02:46:55*carum joined #nimrod
02:48:31*carum quit (Remote host closed the connection)
02:50:05*carum joined #nimrod
02:51:29Skrylarblegh.
02:51:37Skrylari am not looking forward to the next part of dealing with GUIs
02:51:51*carum quit (Remote host closed the connection)
02:58:30Demoshm so generics are instantiated before overload resolution it seems
03:00:28Demosnow interestingly if you tall an overloaded template ALL overloads are instantiated, not just the ones with matching typeclasses
03:01:33*carum joined #nimrod
03:06:32*carum quit (Remote host closed the connection)
03:09:27*carum joined #nimrod
03:13:38*carum quit (Ping timeout: 240 seconds)
03:16:52*DAddYE joined #nimrod
03:21:51*nequitans_ joined #nimrod
03:30:30*DAddYE quit ()
03:38:32VarriountEXetoC: If you update the wrapper, let me know.
03:50:44SkrylarOkay, so I just looked through a stack of reference material for designing a good GUI system. I have one thing to say postmortem:
03:50:45SkrylarFML.
03:51:17*comex quit (Ping timeout: 244 seconds)
03:54:56*comex joined #nimrod
03:58:38VarriountFML?
04:06:33VarriountAraq: ping
04:14:28SkrylarVarriount: http://i.imgur.com/rf4Kd54.gif welcome to hell
04:15:21*Varriount pats Skrylar on the back
04:16:17VarriountSkrylar: If it makes you feel better, I'm getting repeatedly beaten over the head with type nags on this opengl tutorial
04:16:26fowlSkrylar, you can use cairo on windows right
04:16:38Varriount"Error, literal '1' is not of type glInt'
04:16:39Skrylarfowl: sure, it will supposedly interface with GDI
04:17:48DemosI am having trange bugs where adding something before some code (that typechecks) causes some later code to fail to typecheck
04:18:00Demosor sometimes it just causes segfaults
04:19:17VarriountDemos: Memory Corruption?
04:19:32Demosmaybe
04:19:33Skrylareasy way to check on linux
04:19:38Demosnot on linux
04:19:42Skrylarpiss :\
04:19:48Skrylarno valgrind for you
04:20:01VarriountSkrylar: valgrind doesn't like nimrod on either system.
04:20:10Demosbut I am only using the addr operator once, and I am not doing any pointer arithmatic
04:20:13SkrylarVarriount: that sounds like a bug that should be fixed
04:20:18Skrylarvalgrind is a gentleman
04:20:24VarriountSkrylar: The 'bug' is the GC
04:20:48SkrylarVarriount: of course it is *rolleyes* fricking GCs that don't free everything
04:21:00SkrylarI hate when a GC has finalizers that aren't guaranteed to ever run
04:21:31VarriountSkrylar: Eh, it does?
04:21:42SkrylarI don't know if Nimrods is that way, all though isn't one of the options to use boehm?
04:21:46SkrylarIIRC boehm doesn't guarantee finalizers
04:22:06SkrylarI seem to remember that boehm's will also just leak memory if its below an amount that the GC decides is worth watching
04:22:13VarriountSkrylar: Nimrod's default GC isn't boehm.
04:22:20Skrylardidn't say default
04:22:37Skrylarif any of the options doesn't guarantee finalizers, then finalizers aren't guaranteed in the language
04:25:56DemosI think it is reasonable to not garentee finalizers, we have destructors
04:27:12Demosoh my god is nimrod re-useing an already instantiated template in a really stupid way...
04:27:56SkrylarDemos: usually finalizers trip destructors though, at least in other languages
04:28:14DemosI dont think they do in nimrod
04:28:30Skrylari've seen things like C# go "oh we don't have destructors, we have finalizers! oh by the way they aren't guaranteed, so they're basically useless. So here's IDisposable which is basically the same thing as a destructor but a bigger pain in your ass :D"
04:28:31Demosnot 100% sure though
04:28:49Demosyeah IDisposable is not really that nice
04:32:46*DAddYE joined #nimrod
04:35:16Skrylarwell thats weird
04:35:38Skrylarimport two files which have the same code, export the files
04:35:52Skrylar-> didn't get compiler complaint that i just exported the same symbols twice
04:39:27*OrionPK quit (Remote host closed the connection)
04:42:30*OrionPK joined #nimrod
04:42:39OrionPKthere
04:42:43OrionPKrunning on my cubox :)
04:45:36*DAddYE quit (Remote host closed the connection)
04:46:04*DAddYE joined #nimrod
04:50:33Demoshttps://gist.github.com/barcharcraz/62b1d7d2d9ff809841d7
04:50:36Demosknown bug?
04:50:43*DAddYE quit (Ping timeout: 252 seconds)
05:04:22fowlDemos, quantum computer
05:04:40*DAddYE joined #nimrod
05:04:43Demosit actually caused a really spooky bug
05:05:33Demossince I was using when compiles(...) to work around the fact that one possible overload of a template failing to compile will make the whole program fail to compile, even if that overload would not have been selected
05:05:59Demosand now I can not find where the hell compiles() even is in the compiler
05:12:37Demos# undo symbol table changes (as far as it's possible):
05:12:51Demosfrom the proc called in the Compiles magic
05:23:37*XAMPP joined #nimrod
05:30:04fowlSkrylar, lets steal morphic
05:37:17Demoswowah
05:42:40*DAddYE quit ()
05:45:12*nequitans_ quit (Ping timeout: 264 seconds)
05:45:44Skrylarfowl: lol
05:46:09Skrylarfowl: i'm working on that, there's just a lot of crap in the way
05:48:55fowli have a wrapper for clutter if you want to try that out, it handles fonts and stuff, opens a nice little window for you
05:49:07Skrylarisn't clutter GPL-y
05:49:47fowllgpl
05:55:05*r0b4 quit (Ping timeout: 252 seconds)
06:06:18Skrylari wish theere was just an easy -L to add search directories for units
06:13:01runvnchello
06:13:05runvncI am trying to use tables
06:13:13runvncI am using a string as the key
06:13:41runvncstring looks to be the same but when I look in mytable["whateverid"] it says it is nil
06:15:01runvncdoes it have to be the reference to the same string? I was hoping having the same characters would be good enough
06:15:09runvncmaybe there is a null character at the end of one or something
06:28:59*isenmann quit (Ping timeout: 252 seconds)
06:32:04*isenmann joined #nimrod
06:35:44*xtagon joined #nimrod
06:39:52*brson joined #nimrod
06:42:23Varriountrunvnc: It would help if we could see some code.
06:42:34VarriountSkrylar: Have you seen filwit's forum post?
06:42:47Skrylarnerp
06:42:52Skrylarwhere is it?
06:43:09Varriounthttp://forum.nimrod-lang.org/t/389
06:43:55VarriountMaybe it's just because I come from python, but I dislike the removal of colons separating parameter idents and their types.
06:44:22runvncvarriount thanks
06:44:27runvncI already changed it to use a hash
06:44:31runvncbut here is the code https://gist.github.com/ithkuil/9362338
06:44:34VarriountIt seems visually ambiguous to me. (And yes, I think C/C++ are also visually ambiguous in the same way)
06:44:34runvncwhich is embarassing
06:44:44runvncbut if you can imagine that code with a ttable[string instead of ttable[int
06:44:57runvncfor some reason it kept saying it couldnt find the socket with the id
06:45:11Skrylaryeah i don't have a problem with the colons, especially when you know and use the pascal syntax
06:45:12Varriountrunvnc: If you need a string table, you might be interested in the strtabs module
06:45:29Skrylar"foo, bar: int" means you actually specify the type LESS than in a C-like
06:46:11VarriountSkrylar: That's what I mean.
06:46:12runvncthanks but I need to put TSockets in it
06:47:07Skrylari'm actually pretty happy with the syntax as it is right now, but maybe thats just me
06:47:29DemosI am to... but I am coming from c++
06:47:44Varriountrunvnc: Are you testing with string literals?
06:47:47Skrylarit seems to have the safety rails of Pascal the "look i made spaces important" that people like for some odd reason in Python
06:48:18runvncI didn't test with string literals
06:48:24runvncbut I think I know what I did now
06:48:33runvncI should have stopped programming 4 hours ago
06:48:38runvncbrain doesn't work adequately
06:48:44Varriount:3
06:48:48runvncand so I got my response queue id confused with my request id
06:49:20Demosgaah I really want to fix this compiles() bug
06:49:45Skrylarbleh i'm conflicted
06:49:49VarriountSkrylar: What has the safety rails - filwit's suggestions or the current nimrod syntax?
06:50:07SkrylarVarriount: the current syntax, all though the type system is more what i meant
06:50:25Skrylarhis proposed syntax summary doesn't actually show very much
06:51:32Varriountrunvnc: I can't really figure out what was wrong without the old code. Sorry.
06:51:38*filwit joined #nimrod
06:51:49SkrylarVarriount: hrm.. it looks like "a, b int" is just asking to have typos happen
06:51:54VarriountOh, Speaking of which, here he is now.
06:52:01filwithey
06:52:11runvncits ok I figured it out after I talked to you so thanks. just got my request id and response q confused
06:52:12VarriountHi filwit, we were just gossiping about you :3
06:52:13filwittalking about my syntax proposal i see
06:52:42filwitVarriount: hope all good things ;P
06:52:48Varriountfilwit: I don't like the removal of colons. It makes the syntax too ambiguous.
06:53:00VarriountWith regard to proc parameters
06:53:28filwitVarriount: i raise this point in the post, it's not ambiguous at all with color coding. Just hard to see on github/nimforums
06:53:33Skrylari'm not a fan of removing the colons but if you keep the colons then it reads like line noise to keep them
06:53:53Varriountfilwit: Yes, but then you depend on syntax highlighting.
06:54:02filwiti really think i'm going to have to make a screenshot, cause everything keeps bringing that up and I kinda anticipated it
06:54:14filwitVarriount: do you really program in Notepad?
06:54:33Skrylarits not *just* syntax highlighting; nimrod is style-agnostic so what is a 'type' from a 'parameter name'
06:54:44filwitVarriount: and because the syntax rules are so straight-forward, you can make a regex for virtually every text-editor
06:54:46Demosto be fair I program in VS or scite, both of which do not do that highlighting
06:54:46Varriountfilwit: I program everywhere. I write down ideas on paper in class, on my phone, etc.
06:54:49Skrylarwhich means to be particularly good, it needs parser support
06:54:59Skrylarunless you just shotgun it with 'highlight anything camelcase'
06:55:02Demosand docutils does not highlight them
06:55:21Varriountfilwit: Also, there's a technical problem
06:55:46filwitSkrylar: i don't follow what you're saying
06:56:12VarriountRemoving the colon means that, to the parser and compiler, there is less distinction between parameter ident's and their types.
06:56:15Skrylarfilwit: proc soup(a, b some_type; c, d, e AlsoType) int: # what gets highlighted?
06:56:34filwitDemos: in Kate with my styleling Nimrod looks very good
06:56:59Skrylarmaybe a PEG-based highlighter would understand its the identifier after a space not prefixed with a colon
06:57:25VarriountHm. runvnc, what do you think?
06:57:49runvncneed a few minutes wasn't following
06:58:01filwitSkrylar: everything is "highlighted". but types/pragmas are hightlighted to be distinct. In your example some_type and AlsoType are highlighted like types because they follow variables
06:58:08Varriountfilwit: I am interested, why remove the colons (other than "because" and "syntax highlighting")
06:58:18Skrylarfilwit: i meant in a technical context
06:58:27Skrylarhow you tell various syntax highlighters to do it correctly
06:59:00SkrylarSome highlighters are really weak (Vim's is sadly just regexp soup) while others are really powerful (TextMate/Sublime's CSS-scoping parsers)
06:59:08filwitVarriount: this is why i said to read the whole proposal.. it' explains why.. the main reason is to make OOP macros and type/proc/if/else completely consistent on how they're called (including multi-line calls like how var/const work)
06:59:48VarriountSkrylar: I can't think offhand how I would create a Sublime Text scoping rule to highlight that.
07:00:38filwitSkrylar: without semantic highlighting you highlight a context with the keyword 'proc' then every first-word is considered the name, preceding ones considered pragma/types
07:00:45Varriountfilwit: Perhaps you could post a more in-depth of your OOP macros as they are now, and as they would be?
07:01:06runvncwhere is the proposal
07:01:19Varriounthttp://forum.nimrod-lang.org/t/389
07:01:24filwitSkrylar: i could make this highlight perfectly in Kate and probably Gedit/Aporia without any problems
07:01:36*xtagon quit (Quit: Leaving)
07:02:18filwitVarriount: the point is that for if/else/ect (including macros which consume bodies) the "body" follows the ':'
07:02:39filwitVarriount: whereas it follows the '=' for procs, and something completely different for types
07:03:07filwitVarriount: in my syntax, not only are all things completely consistent under one rule, it's also much easier to type and read (lot less symbols)
07:03:25Varriountfilwit: Yes, that makes sense for *adding* colons or replacing '=', but not removing them (unless you want to have colons only be used for that one purpose)
07:04:40filwitVarriount: which i do actually, because then we also get the option to have {} as a indent-insensitive alternative to :
07:05:43*brson_ joined #nimrod
07:05:51filwitVarriount: plus, proc's already use : so i would need to shift it for those regardless. This proposal is a lot of me trying to work out exactly how to completely minimize the rules and shift things around so they're the _most_consistent across all language idioms
07:06:15Varriountfilwit: Come-again? How does removing ':' from their role as type separators free up '{' '}'?
07:07:04filwitVarriount: ah, forgot to include that from the previous example. Set would be (similar to seqs) @{} or something
07:07:35filwitVarriount: or you could simply revers that and make @{} the brackets for indent insensitive
07:07:40runvncIf this proposal were the current syntax of Nimrod I would be happy. Generally I like fewer characters.
07:07:43Varriountfilwit: Do you propose removing type-inference from let and var blocks?
07:07:54filwitVarriount: no
07:08:04runvncI am not sure though whether removing these : and {} and swapping = actually makes the syntax clearer
07:08:17runvncI think the biggest issue though is redoing all of the syntax highlighting tools
07:08:37runvncso it would have to be a Really awesome syntax for people to want to do that
07:08:44Varriountfilwit: Your removal of ':' from var and let blocks would make inference impossible
07:08:50filwitrunvnc: considering there's relatively few of those tools today, probably not near as big a problem as actually changing the compiler syntax :P
07:08:56runvncI don't think that Araq is going to do it
07:09:11filwitVarriount: no it wouldn't. please explain why you think that.
07:09:12*brson quit (Ping timeout: 264 seconds)
07:09:13runvncif he does, I will be happy to skip typing a few : and maybe it will be better.. not sure if it is actually easier to read or not
07:09:24runvncI like the current syntax also
07:09:46filwitrunvnc: he very well may not. I hope he does, but if he doesn't I will probably eventually make my own parser (far from now) which works this way
07:09:46runvncfilwit: you are a brave man with a noble cause
07:10:02runvncheh
07:10:08filwit;)
07:10:16runvncis there a representation for nimrod that is independent of syntax
07:10:23runvnclike an ast serialization
07:10:35filwityou mean the AST in general?
07:11:00runvncwell your proposal doesnt change the meaning of nimrod or how it works
07:11:22filwityes, because Nimrod is pretty much perfect technically speaking :)
07:11:24runvncso theoretically on some level in the machine's memory there could be an equivalent representation after parsing two different syntaxes
07:11:25Varriountfilwit: Because, in nimrod, variables can be *assigned* types, "proc foo(x int)" could either mean, "assign this parameter the typedesc of int" or "set the type of this parameter as int"
07:12:28filwitVarriount: i'm not seeing the problem. could you make a more concrete code example?
07:12:34runvncwhats the difference varriount
07:12:45Varriountfilwit: Maybe my arguments don't make sense. It's 2 in the morning, I should probably get some sleep and form coherent reasons.
07:13:20filwitVarriount: no problem. if you do in fact find a flaw (i doubt it because i have giving this a ton of thought) then i would love to hear it.
07:13:45runvncquestion is how does an alternate parse get integrated into the toolchain or whatever
07:13:53runvncparser
07:13:59Varriountfilwit: I hope you don't dislike me too much for my disagreement. Maybe it's just my petty preferences getting the better of me.
07:14:15Varriountfilwit: I hope you can put up more examples for me to peruse.
07:14:22VarriountAnyway, goodnight.
07:14:25Skrylari'm going to bow out of the conversation for a bit; there is a colossal amount of dependency hell i have to code for this GUI
07:14:26filwitrunvnc: i'm not sure exactly, but apparently it's pretty straight forward to make a new parser (though not so much to replace the existing one)
07:14:51filwitVarriount: okay, i will later, this stuff is all back-burner anyways
07:14:55runvncif you make a new parser and hardly anyone uses it except you
07:15:02runvncyou can still say you made your own parse
07:15:04runvncr
07:15:10runvncor syntax and perhaps claim that it is better
07:15:13runvncand maybe it will be
07:15:36runvncand if the syntax of nimrod doesn't change then you could go on using your own syntax happily for the rest of your life
07:15:51runvncperhaps start your own #nimrodbettersyntax
07:15:58runvncmove to spain
07:16:03runvncget a compound
07:16:05runvncsorry offtopic
07:16:07runvncheh
07:16:17filwit;P
07:17:52runvncon the other hand since you are obviously another one of these geniuses maybe you could help the other nimrod geniuses with something that doesn't require writing a new parser
07:18:10runvncanyway night
07:18:13*runvnc quit (Quit: Leaving)
07:18:27filwitVarriount: btw, you DID click on the github gist link in my proposal right? You didn't just see what's on the forums..
07:31:17SkrylarI saw the gist
07:31:38SkrylarI'm not sure how I feel about removing :, even though keeping it generates line noise
07:32:09Skrylar"i like what the change is supposed to do, i don't like the change itself"
07:32:11filwitSkrylar: it's not about line noise, that's just an added benefit of shifting : to mean "consume body"
07:33:08filwitSkrylar: but if you have something more consistent across all fronts which makes OOP macros and type/proc entirely consistent, then please post it on the forums
07:33:40filwitSkrylar: right now i'm working on the documentation design, and we probably shouldn't get super side-tracked about these issues yet again
07:35:00filwitSkrylar: but I appreciate any feedback.
07:36:11filwitSkrylar: honestly though, i've thought about this A LOT, and i'm guessing if you really try to adjust what i've done by much you'll see it breaks consistency in some other place in the language (unlike my proposal which is very consistent across everything).
07:39:19Skrylari do know that its going to break literally every line of code
07:40:39filwityes and that is a concern. also it's not going to be easy for anyone to actually switch the syntax. That's why this is more about spreading ideas to the community than asking for a feature.
07:43:36filwitthe main point is that syntax *is* important to a language's adoption at some level. It's debatable how much, and probably depends on who the audience is. But, like science, we should always improve and only do so when there's demonstrable reason. I think having a super-consistent syntax which allows for both python-style & c-style indentation would, at some point, really help Nimrod's adoption, which is why i'm putting the idea out there and letting it get ei
07:43:36filwitther shot down (which i'll accept for valid reason) or eventually accepted by everyone and worked into the actual design
07:43:52*carum joined #nimrod
07:44:16filwitI'm hoping we haven't passed the point of no-return in terms of syntax (mean it wouldn't be worth changing the syntax due to backwards compatibility reason)
07:50:29SkrylarI should look in to using macros at some point. I haven't really gone past template use, and when I try to use macros it tends to just crash the compiler
07:50:56Skrylars/use/write
07:53:40filwitmacros in Nimrod are amazing :)
07:54:33filwitrunning to the store, bbl
07:58:59*BitPuffin quit (Ping timeout: 240 seconds)
08:00:54NimBotAraq/Nimrod devel 6f6c389 Araq [+0 ±3 -0]: fixes #942
08:00:54NimBotAraq/Nimrod devel b1bbde2 Araq [+0 ±2 -0]: bugfix: unreported 'compiles' bug
08:11:02*filwit quit (*.net *.split)
08:11:03*comex quit (*.net *.split)
08:11:04*vendethiel quit (*.net *.split)
08:11:05*Varriount quit (*.net *.split)
08:11:06*CarpNet quit (*.net *.split)
08:11:06*cark quit (*.net *.split)
08:11:06*betawaffle quit (*.net *.split)
08:11:09*Demos quit (*.net *.split)
08:11:12*fowl quit (*.net *.split)
08:11:12*Raynes quit (*.net *.split)
08:11:13*eigenlicht quit (*.net *.split)
08:11:14*alphawaffle joined #nimrod
08:11:17*alphawaffle is now known as betawaffle
08:11:51*vendethiel joined #nimrod
08:18:17*CarpNet joined #nimrod
08:18:56*comex joined #nimrod
08:22:55*filwit joined #nimrod
08:40:59filwitnothing like working with spicy ramen at 3 in the morning :)
08:45:00Skrylaryay spicy food
08:45:34Skrylardownside of learning audio engineering: when you look at a waveform for an mp3 and go ".. no, they ruined it."
08:46:21Skrylarmusic is supposed to have all these interesting shapes and then theres a trend where they go in and ruin it all so it drowns itself out
08:46:24filwitnever really got into audio processing
08:49:30Skrylari like trying to produce music even though i'm crap at it
08:49:56filwitthat's cool
08:50:07*XAMPP quit (Read error: Connection reset by peer)
08:50:31filwiti was always more into visual art, but i appreciate sounds too
08:50:54Skrylarbleh. i'd like to draw but practicing drawing is tedious
08:51:19*filwit things practicing music is tedious :P
08:51:27SkrylarI don't practice it correctly :>
08:51:47filwitfair enough
08:52:03filwiti had a guitar once that i was planning on learning to swoon all the girls with
08:52:10filwitbut it burnt up in a car crash
08:52:16Skrylar:<
08:52:44filwityeah. sux too. it had a nice grey wood finish
08:52:48SkrylarIts too bad the guy who wrote Buzz lost his source code. Apparently its *still* one of the best trackers
08:53:10*carum quit (Remote host closed the connection)
08:53:35filwitdunno what that is
08:53:37SkrylarRenoise does this annoying thing where you can't have a different length for drums as you can for the bass, everything has to be done in set size blocks; people have been griping about this for years apparently
08:53:41Skrylarits a tracker
08:53:47Skrylarold amiga-style music editor
08:54:04Skrylartrackers are basically what programmers would use to write music. lopl
08:54:06Skrylar*lol
08:54:15filwitah, okay
08:54:19filwitlike fruityloops
08:54:25Skrylarfruityloops is a sequencer
08:54:46Skrylarhttp://www.creativeobserver.com/img/4013_renoise_screenshot_lg.jpg
08:55:05Skrylaryou put in notes on a top-down stack and it turns instruments on/off
08:55:26filwiti thought that's what fruityloops did too
08:55:35Skrylarfruityloops uses a piano roll
08:56:02*filwit will not retain any of this..
08:56:06Skrylar:P
08:56:10filwit;)
08:56:27Skrylari would not object to writing a tracker at some point, if i escape GUI-writing prison
08:56:38SkrylarRenoise is nice but the devs... don't really.. listen to anyone
08:57:02filwitmake gui-less music program
08:57:09filwitcontrol entirely through shortcuts
08:57:15Skrylarthats pretty much a tracker
08:58:17Skrylarsome people like them because they're almost entirely keyboard driven
08:58:21Skrylaror basically "vi for music"
08:58:30filwitlol
08:58:40Skrylarwhereas fruityloops is more like "photoshop for music"
08:59:12filwitthat explains things better than any lengthy detailed explanation could have..
08:59:49Skrylarfruity is so freakin expensive these days
08:59:59Skrylari wish i could have gotten a copy back when it was like 60$ for the whole program
09:00:01YcrosI really don't like trackers
09:00:57Skrylari like them for drafting
09:01:14*cark joined #nimrod
09:01:14*eigenlicht joined #nimrod
09:01:14*Raynes joined #nimrod
09:01:14*fowl joined #nimrod
09:01:14*Demos joined #nimrod
09:01:19Skrylarusually if you mention wanting to use both in the same project people stare at you
09:01:31Ycroshmm that could be nice
09:01:40YcrosI usually just play things in though
09:02:17Skrylari found that for whatever reason my better sounding stuff has come out of a tracker; usually in piano rolls i get stuck trying to get individual notes to obey
09:02:20YcrosI use Ableton
09:02:52Skrylari have reaper+renoise; i think i touched ableton once but had no idea how to use it
09:02:53*Varriount joined #nimrod
09:05:47Demosyay! my bug was fixed!. Thanks Araq
09:05:47*Demos quit (Quit: Leaving)
09:06:03YcrosI have reaper, but I've only really used it for ninjam
09:09:07SkrylarI was indifferent to reaper for the most part; then i discovered you can tell it to delete notes when right clicking and i liked it again
09:09:13Skrylaralso has really good support for OSC
09:09:17Ycrosheh
09:09:34Skrylari hated how every sequencer on linux gave me a context menu on right click, except for LMMS
09:12:52*cark quit (Write error: Connection reset by peer)
09:12:52*cark joined #nimrod
09:16:46Ycrosyeah lmms is probably the best open source one. It's a vague FL clone
09:27:19Skrylarwoot, today was productive
09:27:22Skrylarwrote a rectangle math module
09:27:31Skrylarwell, another one, but this one is all clean and polished
09:44:02*ddl_smurf joined #nimrod
09:48:12*krusipo quit (Ping timeout: 264 seconds)
09:49:59filwita tuple does not need to be {.pure.} right? That's just redundant?
09:56:02*aftersha_ quit (Ping timeout: 264 seconds)
09:56:11Araqfilwit: yes. same for 'object'
09:57:13filwitAraq: okay. i see, because non-inheritable objects don't need the header either. thanks.
10:14:28*krusipo joined #nimrod
10:25:04filwitAraq: is there anyways (besides parsing macros.lineInfo) to get the module name from an expr/stmt padded to an immediate macro?
10:25:35Araqno and in general going up the AST is unsound
10:25:47Araqso don't ask for it :P
10:26:11filwitisn't that exactly what callsite is doing tho?
10:26:43filwit(plus, if things are order-dependent even at the global level, why is it unsound?)
10:27:09filwit(don't need an answer to that, just wondering)
10:27:55filwitAraq: okay thanks. I was just looking to do something a little more 'automatically' but using a pragma will work just fine
10:28:37Araqcallsite is the upper bound of what's sane to allow
10:29:16filwiti haven't really played with callsite yet, but doesn't that basically give me a full overview of the AST from any expr/stmt?
10:29:56filwitis it immutable or something? I don't see how that would be allowed but something like getting the module name would be considered unsound.
10:31:23*brson_ quit (Quit: leaving)
10:31:30filwitor perhaps callsite is also unsound but still there for pragmatic reasons?
10:31:44Skrylardoes the compiler even retain the full module path for that?
10:31:55filwitSkrylar: yes
10:32:09Skrylari know "import foo.bar" is allowable, but i don't know if it would then later regurgitate "foo.bar" in say, logging code
10:32:40Skrylarall though right now if you ask for the position you get a string (not a separate 'filename' and 'line' value) which is just '???:-1,-1'
10:33:29AraqSkrylar: that's a regresssion, can you report it please
10:33:44filwitSkrylar: macros.lineinfo gives you specific information about any expr's file (and it's placement within)
10:34:23Araqand indeed macros.lineinfo is unsound for another definition of 'unsound' ;-)
10:34:50Araqcallsite is sound though
10:35:19*Araq needs to write more blog posts ...
10:37:49filwitoh, one more thing.. does {.noSideEffect.} have any performance implications?
10:37:57filwiti think i asked this before but i forgot
10:38:17filwitmeaning, does it pass something along to GCC which could allow for greater optimization?
10:38:24Araqnot really plus the compiler infers it anyway
10:38:45Araqthe planned optimizer will make excessive use of it though
10:38:51filwitokay thanks (and good to know)
10:39:20SkrylarAraq: you mean that magic LLVM pass that makes all of the problems go away supposedly? </rust>
10:40:24filwitbtw, i was looking at the generated C for a release build, and it looks like the current system.new() isn't as optimized as it could be as it does a lot of "result = 0;". Seems like it could use a few {.noInit.}s
10:41:02filwitjust a note..
10:41:25Skrylari thought the extra result = 0's were something that was supposed to be fixed when the effect system was more stable
10:41:52Araqresult = 0 is optimized by C's optimizer anyway
10:42:03Araqmemset(result, ...) is more of a problem
10:42:22Araq*is optimized away
10:42:37filwiti'm not so positive about the "result = 0"..
10:42:46filwitbased on previous benchmarks..
10:43:01Araqso check the produced assembler and prove me wrong
10:43:17Araqthe benchmarks are using vectors though which memset
10:43:58filwitso some {.noinit.}s would be a good thing either way :P
10:44:15Araqyes, but for 'result = 0' it is irrelevant
10:44:18filwitmaybe i'll try and go through that part of the compiler later on for exercise
10:44:45Araqand I already said 'noInit' is another planned optimization
10:45:01filwiti missed you saying that
10:45:07Araqwe got control flow analysis only recently
10:46:00filwitso as of now you're saying you haven't fine-combed the compiler with optimizer pragmas, or are you talking about some new optimizer thing?
10:46:55Araqnew optimizer thing
10:47:05Araqthat's built on sempass2
10:47:21filwitdunno what that is, but it sounds cool
10:47:37Araqsempass2 already needs to do control flow analysis and guard propagation and something that resembles CSE
10:47:38filwiti'll look into later at some point
10:47:54Araqit might as well optimize the code then too
10:51:55Araqbbl
11:00:32filwitAraq (when your back): would you say it's more efficient (in terms of compile-time) to use a macro with a lot of "newNimNode(); etc; etc" or "getAST(protoTemplate)" ?
11:01:53filwitAraq: I would prefer the later as it makes some of my code easier to understand in general, but I'm afraid of the performance overhead it may cause (and don't want to lengthy benchmarks right now). So do you think it would be better/worse/roughly-same ?
11:04:16filwiti'm hoping getAST doesn't run in the VM and actually increases performance.. guess i could just look..
11:04:17fowlError: internal error: expr: var not init result <-- what are you trying to tell me, compiler!!
11:04:50*aftershave_ joined #nimrod
11:04:59Skrylarfowl: it sounds like the special 'result' value which represents a proc's return value didn't get initialized, but the proc returns an object which really should be
11:20:26*q66 joined #nimrod
11:20:55*io2 joined #nimrod
11:22:36fowli need sleep
11:22:45filwitlater
11:22:47Skrylarsleep is good
11:26:18filwitoh god, just thought of the best name for my game engine... 'syn' (pronounced 'sin', but short for 'syntax', complete with some sort of horns/devil/evil-smile/or-something)
11:26:30filwitthat has to be taken...
11:26:53filwithttp://sourceforge.net/projects/mengin/
11:26:58filwitdamn you!
11:36:35Araqfilwit: 'getAst' should be faster but these concerns should be gone with vm2, right?
11:37:05AraqnewNimNode produces 1 VM instruction in general ...
11:37:38filwitAraq: i only recently learned how to use getAst, haven't really payed attention to compile-times since it's never been a slowdown yet
11:38:20filwitAraq: but thanks for the confirmation, was kinda expecting that, but wasn't sure if getAst was using the VM for some reason
11:39:01Araqnot sure what you mean, getAst uses the VM when it's used in a macro
11:39:37filwitAraq: i meant it's internal operations
11:40:01filwitgetAst invokes a precompiled parser-to-ast func right?
11:40:07filwiteven when called from within a macro
11:40:19Araqright
11:40:40Araqwell the compiler uses the same AST as the macro system so no translation of any kind is necessary
11:41:12Araqwhich is why the macros API is so ugly in places but also why it kicks ass
11:41:15filwitbtw, while compile-times have never really been an issue, VM2 (or maybe some other recent VM change) doesn't seem to have that random 2-sec hang anymore
11:42:26filwitAraq: yeah it took me a little to wrap my head around how the codegen and VM share the same AST nodes
11:42:53filwitAraq: pretty cool design ;) though i'm still not fully aware of all it's facets and details
11:45:23Araqdunno if the design is cool or not, it's awful to implement correctly
11:46:37filwitoh btw, my brother now wants to make a C#-to-Nimrod system for Xamrin devs ;-)
11:48:35filwithe plans on using one of the C# AST libs (NRefactory or Roslyn, i forget which) to convert to Nimrod so that C# developers can take advantage of Nimrod's native codegen (for Android/iOS where they have to pay Xamerin for special libs) and it's awesome GC
11:48:53Araqok ...
11:49:07filwiti thought you would be excited...
11:49:17filwitis there something wrong with that?
11:49:35*darkf_ joined #nimrod
11:49:39Araqnah I simply have to much experience
11:49:42*darkf quit (Disconnected by services)
11:49:44*darkf_ is now known as darkf
11:50:05AraqI keep the excitement for later, when he has working code
11:50:21Araqand figured out the nasty details
11:50:25Araq;-)
11:50:33filwitoh i see, i thought you didn't want him using Nimrod for his project or something :P
11:50:55filwitI'm trying to win him over, and slowly he's starting to listen to reason
11:51:11filwitbut he still has a very large investment in C# and things like XNA/MonoGame
11:52:50filwitanyways, just thought I'd tell you he was now interested (to the point he's going to learn Nimrod) to make that, so hopefully he sees the light after actually playing with Nimrod for awhile, haha (he's never really looked at Nimrod no matter how much i try and get him too)
11:56:49*Skrylar quit (Remote host closed the connection)
12:04:56*Skrylar joined #nimrod
12:05:07SkrylarAraq: I don't suppose there is a cuckoo hash table hiding in the stdlib
12:05:53Araqno, please implement it
12:08:21Skrylarthat will have to occur after sleep
12:08:24Skrylarlol
12:16:53Skrylarthis GUI crap will probably need a glyph cache to store rendered text characters in, it looks like thats a decent hash for something like it
12:17:54Skrylaralso thinking about cheating and storing the floats in int16's, because texture references tend to be in 0.0-1.0 and there shouldn't be an issue with resolution as nobody is putting 65k by 65k textures in opengl
12:18:30Skrylarcheating it like that saves at least four bytes per glyph
12:49:54*io2 quit ()
13:00:24*askatasuna joined #nimrod
13:05:14*BitPuffin joined #nimrod
13:30:37*BitPuffin quit (Ping timeout: 252 seconds)
13:34:21*nequitans_ joined #nimrod
13:35:19*faassen joined #nimrod
13:41:44*BitPuffin joined #nimrod
13:47:29*io2 joined #nimrod
13:48:23*r0b4 joined #nimrod
13:55:56*OrionPK quit (Ping timeout: 252 seconds)
14:12:16*awestroke joined #nimrod
14:29:40*darkf quit (Quit: Leaving)
14:41:21*OrionPK joined #nimrod
14:41:46*nequitans_ quit (Ping timeout: 244 seconds)
14:42:08OrionPKjebus, silly static ip
14:58:39*askatasuna quit (Quit: WeeChat 0.4.2)
15:09:15*io2 quit ()
15:24:59*Endy joined #nimrod
15:25:11*faassen quit (Quit: Leaving.)
15:55:26NimBotAraq/Nimrod devel 6598447 Pontus Stenetorp [+0 ±1 -0]: No execute bit for c-sources build.sh, fixing doc
15:55:26NimBotAraq/Nimrod devel bac16bf Simon Hafner [+0 ±1 -0]: Merge pull request #974 from ninjin/devel... 2 more lines
15:57:47*askatasuna joined #nimrod
15:57:52*filwit quit (Quit: Leaving)
16:02:55*[1]Endy joined #nimrod
16:06:19*Endy quit (Ping timeout: 252 seconds)
16:06:19*[1]Endy is now known as Endy
16:19:14*awestroke quit (Remote host closed the connection)
16:29:02*ddl_smurf_ joined #nimrod
16:29:15*ddl_smurf quit (Read error: Operation timed out)
16:29:15*ddl_smurf_ is now known as ddl_smurf
16:38:49*zielmicha joined #nimrod
17:38:16*DAddYE joined #nimrod
17:39:00*DAddYE quit (Client Quit)
17:39:17*DAddYE joined #nimrod
17:44:21*brson joined #nimrod
17:49:55*xtagon joined #nimrod
17:58:16*carum joined #nimrod
18:13:12*Matthias247 joined #nimrod
18:21:20*carum quit (Remote host closed the connection)
18:24:49*askatasuna quit (Quit: WeeChat 0.4.2)
18:24:57*carum joined #nimrod
18:29:44*nande joined #nimrod
18:53:34*Endy quit (Ping timeout: 252 seconds)
18:57:18VarriountAraq: What do you think of filwit's syntax proposal?
19:04:05dom96hello
19:07:23reactormonkVarriount, syntax proposal?
19:08:24dom96http://forum.nimrod-lang.org/t/389
19:11:23reactormonkinteresting.
19:11:45reactormonkI think this might go hand-in-hand with mixed case sensitivity with variables lowercase and types uppercase
19:12:20*Varriount still doesn't like the removal of ':' to specify types
19:12:26reactormonk^ exactly
19:13:59Varriountreactormonk: I've also found a problem with the syntax suggestion - it fails with pragma that accept parameters, or procs that have no pragmas or one pragma and no return type.
19:14:32reactormonkVarriount, pos them.
19:14:33Varriount"proc foo(a int) bar:" - Is bar a pragma, or a type?
19:14:38EXetoCyeah, going from 4 to 2 characters will make most people happy
19:14:57reactormonkVarriount, it's a pragma if we have mixed-case
19:15:19Varriountreactormonk: Howso?
19:18:29*sdmtrack joined #nimrod
19:18:52dom96hi sdmtrack
19:19:45Varriountdom96: What do you think?
19:19:56*dom96 is writing a long post describing his views
19:20:13Varriountdom96: How conincidental, so am I.
19:20:23Varriount*coincidental
19:22:09reactormonkVarriount, if we get mixed as casesensitivity sometime in the future, types start with a capital letter and everything else with a lowercase
19:22:20reactormonkVarriount, but still, it's a valid point. post it.
19:28:34Varriountdom96: Let me know when you post your comments.
19:28:42dom96ok
19:29:30*Demos joined #nimrod
19:29:38VarriountHi Demos
19:30:17Demoshi Varriount
19:36:53*io2 joined #nimrod
19:39:13dom96Varriount: posted
19:41:14Varriountdom96: Thanks. You might want to lso mention, in the part where you mention syntax highlighting, that not all of us write code where syntax highlighting is available (pieces of paper...)
19:41:35VarriountAnd yes, I am one of those people.
19:42:00dom96True. You can mention that.
19:42:21dom96I'm scared people will say "You might as well use Notepad then"
19:42:41Varriountdom96: I'll probably have a post up later today (in about 5-7 hours)
19:44:25*skyfex joined #nimrod
19:45:33dom96ooh, finally something I can participate in? https://www.calltocode.ie
19:46:03dom96Nope.
19:46:12dom96"a resident and legal citizen of the Republic of Ireland"
19:46:14OrionPKI agree with Varriount. the ":"'s should stay
19:46:16dom96Screw you too Google :(
19:48:16Matthias247I'm too old :`(
19:49:00VarriountI'm not a legal citizen of the ROI
19:49:12dom96I'm in Northern Ireland.
19:49:27VarriountOh, and I'm also too old.
19:51:08Demosdamn another generic bug
19:51:47io2dom96: you should most definitely watch Sagan's series first.
19:52:24dom96io2: It's so old though lol
19:52:55io2dom96: my childhood has so many fond memories of this and sagan's way of portraying the unknown was something extraordinary
19:53:06io2he also issued updates to every episode of the series after years
19:53:20io2dom96: it is a question of watching the man speak and analyze his way of thinking.
19:53:45io2the mona lisa is also old, but still awesome nonetheless, remember that ;)
19:54:49Skrylardom96: did you end up getting a response from GSOC?
19:54:51*filwit joined #nimrod
19:55:07filwithey, scanned logs, can't stay long.
19:55:11filwitVarriount: "proc foo(a int) bar:" - Is bar a pragma, or a type?
19:55:21filwitit's a proc named 'foo'
19:55:42filwitif you want pramas with param, use regular syntax: proc foo bar(..) int: ...
19:55:51filwitbar is the pragma
19:56:25filwitif proc appears after a '=' then the name insn't considered
19:56:29filwitisn't**
19:56:50dom96oh. That looks an ambiguity.
19:56:53dom96*looks like
19:57:51filwitit does appear like it, though technically syntax highlighting could fix that. but you might have found a flaw
19:57:58*shevy joined #nimrod
19:58:06shevyhey fowl! paranoidd is doing gobolinux releases
19:58:27dom96filwit: Sadly I don't think so.
19:58:34dom96The compiler won't be able to tell the difference.
19:59:02VarriountNot without some heavy inference to tell when a ident is a type or a pragma
19:59:28dom96I don't think that would even help.
19:59:35Demoshttps://gist.github.com/barcharcraz/6b9bcfc874334de2c914 <-- should it compile?
19:59:37dom96If you have a type Bar and a pragma Bar.
19:59:42filwitdom96: you might be right, but then there might be solutions to that that doesn't involve using the {. .}
20:00:55dom96There is another argument against this, sometimes people do not use nimrod syntax highlighting in gists... :P
20:01:14dom96Demos: What's the error?
20:02:05Demosrefersh gist
20:02:15VarriountI can't syntax highlight code scrawled on pieces of paper in my math class, or in the car (as a passenger)... at least, not without some coloured pencils.
20:02:20*OrionPK quit (Ping timeout: 252 seconds)
20:02:30filwitdom96: not the best of arguments, but somewhat valid. I would take a consistent cleaner syntax over github highlighting any day.
20:03:01filwitdom96: i'm not sure if there's an ambiguity with "proc name pragma()" vs "type name = proc pragma()"
20:03:29filwitwhoops.. used '=' when i should have used ':' :P
20:03:33*dom96 considers printing out some syntax highlighted Nimrod code and putting it up on his wall
20:03:58*filwit thinks it would make good wallpaper
20:04:34Varriountfilwit: Have you considered using source code filters to alleviate some of your OO macro problems?
20:04:36dom96filwit: See how natural '=' is? :P
20:05:07dom96Demos: Indeed looks like a bug
20:05:18filwitdom96: i actually realized that in my proposal both : & = where completely interchangable
20:05:38dom96filwit: Did you read my post?
20:05:40filwitVarriount: no, i don't even know what source code filter do much and how they work, but i've heard them mentioned before
20:05:47filwitdom96: no
20:06:33VarriountSeriously? Am I the only one that enjoys reading every document on a website?
20:06:38Varriountfilwit: http://nimrod-lang.org/filters.html
20:06:54*rallan quit (Remote host closed the connection)
20:06:56*sdmtrack quit (Remote host closed the connection)
20:07:30Demosdom96, I am not 100% sure. it seems like a consequence of substitution failure during instantiation being considered an error
20:07:32filwitVarriount: yeah i came across it before but never really payed attention. Will check it out later.
20:07:44*ddl_smurf quit (Quit: ddl_smurf)
20:08:07*OrionPK joined #nimrod
20:08:17Varriountfilwit: They can also be used by those who prefer using tabs
20:08:19filwitdom96: thanks for writing a thorough response, but i disagree with you about the {} thing for the same reasons I would disagree that case-insensitivity is a bad thing
20:08:28OrionPKwhat was my exit code from irc, anyone?
20:08:32DemosI am not sure if nimrod's behavior is actually extremely confusing or if I am just really used to c++, where a failure during substitution is ignored as long as there are other versions of the template that do work
20:08:35filwitdom96: if anything optional {} would attract many more users
20:08:39VarriountOrionPK: Timeout
20:08:43OrionPKmmk.. thanks
20:08:47OrionPKmust have lost my internet at home
20:08:56dom96filwit: Then why doesn't style insensitivity attract more users?
20:08:58*Mat3 joined #nimrod
20:09:01Mat3hi all
20:09:15VarriountHi Mat3
20:09:19Demosone problem is that so few people even know we exist
20:09:59Mat3hello Varriount
20:10:13*Varriount throws a Konig Pudle into Mat3's lap
20:10:30filwitdom96: sorry read your question wrong for a sec. Case insensitivity probably would attract users, just not by itself
20:10:36DemosI feel like generics are so similar to c++ templates that I really expect them to work exactly the same way, but that does not come from a rational thought process, just gut.
20:10:54VarriountDemos: I have heard wierd things about C++ templates.
20:11:00Demoslike what?
20:11:12VarriountLike how they can dramatically increase compilation time, and cause wierd errors.
20:11:13OrionPKcomcast sucks
20:11:44DemosI dont think they harm compile time that much, esp if you use them as generics and not as a computational device
20:11:53filwitdom96: plus, case-style doesn't seem to be as big a concern as indent in/sensitivity does
20:12:05filwitdom96: **among those that care
20:12:25filwitdom96: it seems you have die-hard fans on both sides of the python/c-style fence
20:12:34Demosand nimrod has typeclasses which helps with the errors. Trouble is even "specializeing" on typeclasses EVERY version of the template must be valid with all types that are supposed to be valid for ONE of the templates
20:12:42Araqfilwit: IF we redesign the syntax from scratch I really think we should start with this: http://www.dwheeler.com/readable/
20:12:50filwitdom96, Araq: sorry, brb
20:13:49AraqDemos: failure of a generic constraint shouldn't produce an instantiation
20:14:04Araqare you sure this is not a recently introduced regression?
20:14:10*shevy left #nimrod ("I'll be back ... maybe")
20:14:26Mat3templates in general can lead to obscur errors
20:14:29Demosactually it may be because of the recently fixed compiles() bug
20:14:50Demosstill. what do you think about my gist code? should it compile?
20:16:49filwitAraq: if you do that you will loose a lot of users. Part of my proposal is about making both *large programming camps* feel comfortable. I don't think Lisp is a huge community of people, and surely that syntax will only serve to make it harder to get Nimrod used in production (aka, your eventual funding)
20:17:30Araqfilwit: Lisp is the crown of consistent syntax, so we start from there and introduce shortcuts ... it makes perfect sense
20:17:45*OrionPK quit (Ping timeout: 252 seconds)
20:18:00filwitAraq: because my suggest was basically just removing some existing nimrod symbols, i started writing a simple parser to lower my suggested code to nimrod code and it's somewhat with very little (read 1 hour) or work
20:18:10Araqyou start from the current syntax and try hard to remove any kind of delimiters. I can't see this work.
20:18:34AraqI don't think it works technically and I can't see how this attracts new people
20:18:45filwitAraq: i'm actually open to "start from consistent, add alias". but I don't like that proposed syntax in the link you gave
20:19:08Araqfilwit: that's fine, it's about the approach
20:19:55Mat3Araq: Polish Notation do not need parentheses at all (see Logo)
20:20:24AraqMat3: good point but again, I'm talking about the approach
20:20:56filwitAraq: anyways, what should happen is just making a toy parser which lowers to Nimrod code, like my 1-hour project last night. Then making a Kate/GEdit syntax highlighter to illustrate thing. Then we can play around with things off-n-on for however long it takes to figure out any better syntax if one exists.
20:21:13filwitAraq: part of attracting new users is about advertisement. That has two issues:
20:21:16DemosAraq, yup my example still fails when I add a typeclass "x is int1" and "x is int2" to the respective functions
20:21:43filwitAraq: a) the cleaner the code you illustrate. the easier it is for others to swallow and the sexier it looks compared to C/C++
20:22:10Demosthe current syntax looks damn sexy to my c++ trained eyes
20:22:18Mat3filwit: If you prefer simple parsers, why not a RPN one (which do not need to be parsed at all) ?
20:22:21filwitAraq: b) making people comfortable (like having both indent in/sensitive style) could help in any articles promoting the language
20:22:46filwitMat3: don't know what RPN is
20:23:03Demos3 4 + <--> (3 + 4)
20:23:11filwitAraq: as it stand, my Nimrod code in Kate looks very pretty already
20:23:28Mat3filwit: Reverse Polish Notation
20:23:43AraqDemos: your code should work but 'is' has all sort of problems within a 'static' section. known issue but only zahary1 knows the spec of 'is' in a static context :P
20:24:22Demosthe example actually comes from me using "compiles" in the when block
20:24:51Demosbut is made reduceing the problem to a test case eaiser
20:24:58AraqDemos: well 'compiles' is just inherently flawed and will ultimately be removed or further restricted
20:25:13Demosoh? why is that?
20:25:44Araqbecause theoretically *every single change* then can break code
20:26:04Araqas some guy might have checked that it doesn't compile but now it does
20:26:21DemosI am using it as a "does this identifier exist"
20:26:30Araqyes well
20:26:36Araqthere is 'defined' for that
20:27:00Demosdoes that work on regular global var/lets
20:27:07Araqyes
20:27:27Araqwhich is another flaw lol but a minor one
20:27:29Mat3filwit: proc multi (x: int) = x * x (Nimrodish) <=> multi: i1 i1 * (RPN Nimrodish)
20:27:46Demosstill failing, I am pretty sure it is a problem with generic instantiation
20:28:35filwitMat3: completely unrealistic unless you're used to Lisp, which most programmers aren't, so bad idea
20:29:04Araqfilwit: Lisp might not be sexy, but Clojure surely had its hype and is successful
20:29:22Mat3well, better attract the right ones I would say
20:30:26filwitdom96: ... i was expecting better arguments from your forum post. Basically you say my syntax "feels like C" and that's why you don't like the space seporation. Then your code example (scala vs nimrod) doesn't even use pragmas which is one of the main parts of my proposal.
20:30:32NimBotAraq/Nimrod devel 9613eb4 Araq [+0 ±1 -0]: c2nim knows about the 'union' pragma
20:30:32NimBotAraq/Nimrod devel b03b82b Araq [+0 ±9 -0]: implemented 'union' and 'unchecked' pragmas
20:30:32NimBotAraq/Nimrod devel 903d3ad Araq [+0 ±2 -0]: system.nim makes use of the 'unchecked' pragma
20:30:32NimBotAraq/Nimrod devel 798ae48 Araq [+0 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
20:31:35dom96Mat3: I in fact suggested the same thing yesterday.
20:31:38*OrionPK joined #nimrod
20:31:55AraqMat3: the compiler now supports 'union'. enjoy.
20:32:06Mat3great, thanks !!!
20:32:07dom96But people are not used to RPN
20:32:20filwitAraq: Lisp itself could be considered "successful" it just depends on how much you're willing to bend that definition
20:32:28Demosemacs!
20:32:39*carum quit (Remote host closed the connection)
20:33:09dom96filwit: ... thanks.
20:34:24Demosanyway should I open an issue saying "this should probably compile"?
20:34:28SkrylarDemos, Varriount: @C++ Templates, they destroy compile time *if overused*
20:34:39Demosand I think compiles is totally reasonable for build systemish stuff
20:34:55dom96filwit: The Scala example was more against replacing the '='
20:34:57DemosSkrylar, I think that c++ textual inclusion is probably worse than templates
20:35:06SkrylarWhat happens is that somebody starts using std::pair instead of a POD, and then somewhere you use a functor and some kind of hash table, and then someone else uses a different one somewhere, and now you have to compile the same code like 300 times
20:35:12dom96filwit: And in general to show just how similar Nimrod is to Scala.
20:35:23AraqDemos: yes please
20:35:31Skrylaryeah, textual inclusion and unparsable syntax don't mix well together
20:36:00Skrylarthere are some bigger C builds that if you arrange everything in to a single compilation unit, a full build takes ~3 minutes instead of 15-30
20:36:05filwitdom96: yes but my proposal doesn't even change Nimrod much and if you replaced Scala with Python it would look somewhat just as similar of a comparison
20:36:11Skrylarhowever then you can *only* do a full build :/
20:36:16Mat3dom96: I know it is not common, but beside implementation advantages it also offers a general solution to most of all 'magic simplifying rules' which results from traditional infix notation so this notation is of general use and worth to learn
20:36:35filwitdom96: sorry, i was a little too critical of your post. Your argument about the {} vs : thing where well formed, even though i disagree
20:37:05Mat3^usage?
20:37:07filwitdom96: i just don't like your criticism about me "turning Nimrod into C" which is both untrue and subject
20:37:37SkrylarProbably more like turning nimrod in to Go if anything; doesn't Go use the space-as-typedef syntax?
20:37:37DemosSkrylar, yeah, I know this. Heck C build times are not that great
20:37:59SkrylarDemos: they're comparatively awesome if you have clean headers (read: use makeheaders and shielding)
20:38:08Skrylars/shielding/"opaque pointers"
20:38:39Demoswhat is shielding, jut #ifndef include guards?
20:38:56DemosI was under the impression the "correct" way was not to include stuff in headers and just document dependencies
20:38:57Skrylari don't know what the actual term is but i call it shielding; its basically using opaque types
20:39:05Demospimpl?
20:39:14Demosor forward declerations?
20:39:22dom96filwit: ok, maybe I was a bit too harsh too. But that's what it feels like to me, and I know that it's subjective, I even said so in my post heh
20:39:39Mat3Araq: Variadic records are the equivalence of unions, right ?
20:39:39Skrylarlike if you have an OGRE class that requires 500 layers of STL/Boost crap, you just use a pointer to it (now the typedef is practically size_t instead of this complex 50mb worth of header definition)
20:40:02SkrylarDemos: alternatively, like some of the lower level C libs do, you calculate a header's size and then the header has a fake definition
20:40:13Skrylarstruct thing { i_am_real_honest: byte[52] }
20:40:32Skrylarso basically your internals (and however complex of STL trickery you do) are NOT infecting the user
20:40:33filwitdom96: know that I really don't like C syntax. and personally I probably wouldn't even use {} (though i might for types bodies and stuff to distinguish)
20:40:36Demosright, you do need the actual header if you want to do much meaningful with the object
20:40:49AraqMat3: no idea what you mean
20:40:53Skrylarhow many C++ classes are you honestly tweaking the fields directly in, Demos?
20:41:08filwitdom96: but my attempt to remove symbols came very late (after Araq's post about "hate to say it, but if we just removed...")
20:41:27Demosnot all that many, but I also don't want to have to forward declare all my methods.
20:41:35filwitdom96: i was always trying to get "type Foo: Bar = ..." before, but ran into a wall with that proposal
20:41:40SkrylarDemos: in C you already have to
20:41:42Demosand all this stuff is pretty impossible to do consistently on a large project
20:41:48Araqfilwit: in fact there are lots of other options:
20:41:50filwitdom96: in fact if there's a good way to make that work and keep the ':' i would be all for it
20:42:06SkrylarDemos: none of this applies to nimrod because that uses modules; but for C/C++ you already have to write a header
20:42:38Araq* remove ':' for control flow and then it's only used for type annotations
20:42:41Skrylarwhat I do is use makeheaders, so i don't have to do that
20:42:44filwitdom96, Araq: but the main problem is that is inconsistent with if/else/etc and custom macros, the later of which is important for OOP-crowd adoption
20:43:11Araq* indentation mostly suffices anyway
20:43:16Araqfoo bar
20:43:20Araq baz
20:43:27Demosright, but then you need to deal with hader dependencies and all that hell. And none of this matters if some asshole goes and includes all of boost in his header
20:43:37Demosthat you then have to use because it is a library
20:43:39filwitAraq: yeah i thought of that before, but it breaks down with single lines right?
20:44:01filwitAraq: i also realized that, in my proposal, ':' and '=' are completely interchangable
20:44:03SkrylarDemos: its not that different from normal really; and as i mentioned, a lot of production C code already does exactly that
20:44:23Mat3Araq: how are unions represented in Nimrod (it is some time I have tried) ?
20:44:27Demosand if you ever want to actually write tooling you are totally fucked because it is not clear what libraries even are.
20:44:31Araqfilwit: for single lines we can just require people to use the {} delimiters
20:44:38SkrylarI guess I didn't explain it correctly -shrug-
20:44:39Araqor rather ()
20:44:51filwitAraq: oh god you're right..
20:45:09SkrylarMat3: traditional unions don't exist, however there are pascal-style variants
20:45:20*Endy joined #nimrod
20:45:25DemosSkrylar, I agree that there are ways to make headers less of a problem, but they are all annoying and hard and have a high mental load
20:45:26AraqSkrylar: nope, you're not up to date :P
20:45:30Mat3ok, and these are now translated to unions, I see
20:45:36SkrylarAraq: didy ou finally write that macro :P
20:45:41Araqtype Foo = object {.union.}
20:45:46Araq a, b: int
20:45:48Araqproduces
20:45:57Araqunion { NI a; NI b; }
20:45:58filwitAraq: so ':' is used for types "var foo: int" / "proc foo: int" / "type Foo: Bar", etc, and never for if/else/macros etc
20:46:05Mat3Araq: thanks
20:46:06Araqfilwit: yeah
20:46:13filwitAraq: it's perfect
20:46:31filwitAraq: plus it automatically adds the {} brackets for the C crowd
20:46:47Araqfilwit: no these still cause problems
20:46:48Mat3get some sleep, ciao (by the way it would nice to read about syntactical changes somewhere on the web side)
20:47:21Araqbecause of set literals and the curly accessors a{i}
20:47:30filwitAraq: easy fixes
20:47:36*Mat3 quit (Quit: Verlassend)
20:47:58filwitAraq: plus we could make a old-syntax-to-new-syntax AST converter to convert the whole compiler and all the libs
20:48:02Araqfilwit: sure but we already got (;) for {}
20:48:25Araqso I dunno if {} are necessary
20:48:39filwitAraq: i'm unaware of this, can you point to a docs or give an example?
20:49:20filwitAraq: i would still much prefer {} for advertising to the C crowd, but if (;) exists and is basically the same then wtf are we doing..
20:49:22filwit:P
20:49:42filwit(besides trying to unify the type declaration and OOP macros of course)
20:50:55EXetoC{} for what?
20:51:13SkrylarI'm not sure how much the C crowd can be marketed to.. if you're still using C its because you're crazy or your boss told you to. lol
20:51:23filwitAraq: either way, I really like the idea of only using : for type stuff and making type decl work with it "type Foo: ref Bar = ..." and using {} (or something like it) for single lines and indent insensitive blocks
20:52:04Skrylaranyhow i don't mind the idea of the {} blocks, all though it does require the rest of the changes and i'm still bleh about the idea of removing :
20:52:15Araqjust to be clear
20:52:17Skrylartime to descend in to madness (writing hashtable code)
20:52:37Araqnimrod will not get a new syntax anytime soon
20:52:46filwit^ THIS
20:52:49Araqhowever the compiler supports
20:52:49EXetoCcmon
20:52:50*silven quit (Remote host closed the connection)
20:52:56Araq#! mysyntax
20:53:07Araqand then invokes an alternative parser
20:53:13filwitdidn't know that...
20:53:13EXetoCwhat about that about delegation alternative syntaxes to editors?
20:53:24Araqso that's the way to play with it
20:54:43Araqfilwit: check out compiler/syntaxes.nim
20:55:00Araqis supports 'braces' and 'endx' parsers but these have never been implemented
20:56:08filwitwell that sounds like very good architecture, and a great way to experiment with something new without breaking things
20:56:18filwitgood work on your designs, as usual
20:57:32EXetoCthen it's up to the people who really care to deal with it
20:57:52*carum joined #nimrod
21:00:24renesacone liners needing {} is one of the ugly things I found in rust
21:01:13renesaclike 'let a = if bla > d { 1 } else { d + 2 }'
21:01:30renesachum, not that bad in this example
21:01:47dom96'let a = if bla > d 1 else d + 2'
21:01:58dom96Yeah... if you remove ':' I will cry.
21:02:02renesacthis is bad
21:02:15renesacwhy not just allow '=' for macros?
21:02:32dom96Good question.
21:02:33renesacthis way your OOP macros will be consistent
21:02:51Skrylarhm.
21:02:58renesacand no big change to the language needed, if it is indeed possible
21:03:00SkrylarGiving macros the ability to act as a kind of proc definition?
21:03:03EXetoCoh for single lines only? I don't like that either
21:03:43renesacSkrylar, yes, filwit has an OOP macro that does function definitions in his way
21:04:11renesacso one can have an implicit 'this'
21:05:39*flaviu joined #nimrod
21:06:01renesacof course, it is trade by an extra indentation level, so I'm not sure if the trade-off is worth it
21:06:10renesac*traded
21:06:21Skrylarwell its a sign of a good language that he can be happy with it even if we don't use it
21:09:26filwitrenesac: you don't need the extra indentation level ;)
21:09:41filwit"func Foo.bar(a:int) = this.a = a"
21:10:02filwitwhoops, "func Foo.bar(a:int): this.a = a"
21:10:17filwit(see my concern with : vs =)
21:10:51renesachum, interesting
21:10:52Araqping Varriount
21:11:19renesacbut I don't see much difference between this and
21:12:10renesac'proc bar(x: Foo, a:int): a = a" <-- is this what it means?
21:12:17renesacI'm confused by the this.a at the end
21:12:42EXetoC?
21:13:20EXetoCso much sugar. I don't care for it
21:14:16*Endy quit (Read error: Operation timed out)
21:14:54filwitrenesac: how so? 'func' is a macro which injects "this:Foo" into the params of the resulting proc
21:15:14renesacthis is the only thing it does?
21:15:20EXetoCrenesac: I don't think it's worth the trade-off
21:15:46renesacEXetoC, what tradeoff?
21:15:47filwitrenesac: for the 'func' macro, yes. the 'part' macro does much much more
21:16:10renesacthe 'part' macro needs the 'func' macro to work?
21:16:34renesacor I can use normal procs putting 'x:Foo' into the params?
21:16:50EXetoCrenesac: the additional indentation
21:17:08filwitrenesac: no
21:17:10Skrylarwhy does researching hash algorithms make me feel like i'm writing stdlib code
21:17:32filwitrenesac: i actually have two different concepts i'm experimenting with ATM
21:17:40renesacSkrylar, because the stdlib has a hash library?
21:17:54Skrylarrenesac: i'm writing a different hasher
21:18:18renesacSkrylar, for hash tables or for streams?
21:18:26Skrylarfor hash tables
21:18:54Skrylarsome stuff (like glyph caches for text drawing) have different requirements for hash tabling
21:19:12renesacfor hash tables you have FNV (simplest), MurmurHash3 (good for most purposes), another that I forget the name (cryptographic but relatively fast)
21:19:24Skrylaryeah FNV is a nice easy one
21:19:33Demosyou also probably want to have an identity hash, just in case
21:19:37fowlwoot
21:19:40fowlfallout new vegas
21:21:36renesacfilwit, well, I find the nimrod OOP syntax nice and refreshing, making you rethink exactly what is an object
21:22:06renesacand as it is possible to add new procs/methods to an object anywhere, the 'class'/'part' block don't make as much sense
21:22:09flaviurenesac: I ran the dieharder tests on MurmurHash3, it passes most
21:22:11renesacin nimrod
21:22:34renesacflaviu, hum, interesting
21:22:50filwitrenesac: yes it's good for some, but my main goal is attaching objects and there procedures to an editor. General purpose OOP macros will eventually be added to the standard-libs for the die-hard OOP fans later.
21:22:57*jbe joined #nimrod
21:23:37renesacdie-hard fans of what?
21:23:42Skrylarthe test harness better be called bruce
21:23:45Skrylar:P
21:23:50renesacbecause you already have OOP in nimrod
21:24:14Demossingle dispatch c++ style OOP probably
21:26:09renesachis macro will not change nimrod single/multiple dispatch
21:26:48*nppdelfin joined #nimrod
21:26:51EXetoCare you sure? this is nimrod :>
21:27:14renesacI'm not sure
21:27:15Araqhi nppdelfin welcome
21:27:49Araqping skyfex
21:29:28renesacSkrylar, FNV is good for short strings, if collision avoidance is not of utmost importance for you
21:30:03Araqrenesac: what's good for short strings where collision avoidance is of utmost importance?
21:30:10renesacMMH3 is good for integers and other <= 8 bytes fixed size things, and for longer strings
21:30:17SkrylarAraq: FNV hash
21:30:30renesacAraq, MMH3 hash is better
21:30:36Araqshort here means ~100 .. 300 chars
21:30:43renesacthen MMH3
21:30:50renesacby short I mean < 10 characters
21:31:20Araqright now I'm using MD5 ...
21:31:38Skrylarsomeone on stack overflow is saying "xxhash" is also a decent option
21:31:46renesac100 ~ 300 I would already call medium size, and then the overhead of MMH3 is diluted, and it's multibyte working becomes faster
21:31:54renesacxxhash is good for medium to longer strings
21:32:02renesacit was designed for hashing long streams
21:32:21renesacI haven't tested it on short (<10 characters) strings though
21:32:30renesacbut it seems like MMH3
21:32:40Skrylari'm making the algorithms pluggable anyway
21:32:47Skrylaryay generics
21:32:59renesacit is fast because it unrolls a loop working with multiple 64bit values at the same time
21:33:22renesacbut it can't do this if the string is too short
21:34:00Araqwell <10 chars are not really possible for what I have in mind
21:34:09renesacAraq, MD5 is overkill...
21:34:23Skrylarfor the specific case i need right now, its 4-byte values
21:34:23renesacand MMH3 is not strong against attacks
21:34:34renesacif someone wants to make collisions, he can force it
21:34:38renesaceasily
21:35:36renesachttps://131002.net/siphash/ <-- this is the fast semi-cryptographic hash alternative I talked earlier
21:35:45Skrylarthat reminds me of a system i thought about once where the time taken to process a user's request was tracked and if it went over a certain level it would get offended and boot them
21:35:51renesacit is not that much slower than MMH3
21:35:56Skrylari wondered about it because of griefers in game servers
21:36:19renesacand it (as far as people currently know) is strong against attacks forcing collisions
21:36:26Araqwell but MD5 is in sthe stdlib :P
21:36:37SkrylarAraq: about to be a few more :/
21:36:44Araqalso attacks are not a problem
21:36:50renesacAraq, yeah, but siphash is much faster, especially for shorter strings
21:37:10renesacImplementations of SipHash are available in C, C#, Cryptol, D, Erlang, Go, Haskell, Java, Javascript, Lisp, Ruby, Rust, and PHP.
21:37:16renesac<-- we should add nimrod to that list
21:37:22Skrylari might
21:37:34Skrylari need to make a github for the skylight lib
21:37:54renesacAraq, if attacks are not a problem, MMH3 is faster still
21:38:05Skrylaralso need to port the unicode database over and my NKFD/NFD stuff
21:38:22Skrylari don't feel like it right now
21:38:35renesacI translated it to D once, not too complex
21:38:43Araqvery well, will use it once its ready
21:38:57Araqfor now md5 suffices, it's only a prototype anyway
21:39:55Skrylari was going to port whirlpool to rust but that is some scary looking code
21:40:15Skrylarit has this huge sbox made of magic numbers everywhere
21:40:24*psquid quit (Ping timeout: 264 seconds)
21:40:35renesacheh, siphash is probably similar
21:40:45*renesac haven't looked at it yet
21:41:12Skrylarusually the magic numbers are pre-generated from a formula, i just don't understand the syntax they use to describe it
21:41:49renesachum, it is quite simple actually
21:42:25renesaconly a 7 cases switch and 4 big primes
21:43:08renesacas a finalizer
21:43:20renesacand the main loop is additions, xors and rotations
21:44:02Skrylarthis is exactly the thing that i hate when people do: leave out test vectors
21:44:09Skrylarlooked at the xxhash source and they don't have them
21:48:08renesaclook at BMK_sanityCheck() on bench.c
21:49:11*carum quit ()
21:51:18*psquid joined #nimrod
21:52:21renesacthe RANDOM there makes me remember of xkcd's random dice
21:52:28renesacat least it is all caps
21:52:32renesacXD
21:53:28*psquid quit (Client Quit)
21:53:50Skrylarhrm. murmur uses case fallthrough
21:53:55Skrylarisn't that missing from nimrod?
21:54:19flaviuSkrylar: Try copying the scala implentation
21:55:19Skrylarit would be nice if we had the option to use fallthrough by using 'fall' or something; there are a few languages that offer it that way because of the times its used in low level optimization
21:55:44Demosc# allows fallthough if you have empty case labels
21:55:55Demosif any only if
21:55:58Demos*and
21:56:13fowlemit
21:56:41flaviuhttps://github.com/scala/scala/blob/5710c58b405e107ec29283d846acafd0cda13dcf/src/library/scala/util/hashing/MurmurHash3.scala#L15-L49
21:56:44Skrylarfowl: emit what? we don't have gotos to fake it IIRC
21:57:55AraqSkrylar: not unreasonable but quite some work to implement
21:58:05Araqfowl: is talking about {.emit.}
21:59:16Skrylarpossible easy solution: {.fall.} which just removes the implicit break
21:59:46Skrylarsince you can block x: case meh {.fall.} of blah blah break x
22:00:42Skrylarthat would make it possible to have duff devices
22:01:00*psquid joined #nimrod
22:03:51flaviuIsn't that the optimizer's job?
22:04:39Araqflaviu: C programmers always know better than the optimizer
22:04:55Araqwell they *think* they know better
22:06:17Skrylarsufficiently smart compiler :P
22:07:19renesacYann c aways benchmark before adding it's optimizations (though implicit fall through was probably too natural to benchmark :P)
22:07:39renesacbut yeah, I've used this feature twice this week in C code
22:08:15renesacwell, once nimrod sets would fill the gap
22:08:21DemosC programmers always know better than the compiler except for when it comes to data structures that are hard to implment in C
22:08:25renesac*in one of them
22:08:29*Demos rants about linked lists
22:09:04flaviuIt seems like both clang and gcc can unroll loops
22:09:48renesacflaviu, but not necessarily they will unroll in the manner that makes most sense/is optimal
22:10:04Skrylarduffs aren't always straight loops either
22:10:08Demosrenesac, one word: pragmas
22:10:29renesacwell, maybe when you build it whith profiling, then it can test
22:10:53renesacDemos, we are discussing that there is no {.fall.} pragma
22:10:55Skrylarthe musehash code uses a switch statement in one place as both an unrolled loop and length check
22:11:12renesacand {.unroll.} is unimplemented AFAIK
22:11:28VarriountAraq: Pong
22:12:25Araq.unroll is incredibly easy to fake with an iterator though
22:12:29Araqor with a template
22:12:32renesacDemos, yeah, I also generally hate linked lists
22:12:49renesacthere are very few applications where they are indeed the best choice
22:13:30DemosI feel like they are used because in C they are easy to implement
22:13:46renesacyeah
22:14:01Varriountrenesac: Wouldn't a linked list ussually be better as more of a chunked linked list, with say, each list chunk containing an array of elements rather than a single elements?
22:14:03Araqlinked lists are essential for memory managers though
22:14:09renesacpython programmers don't use them (instead, they append to the front of their lists :P)
22:14:18Demosalso if compiles() is to be removed how are we to do autoconf style platform checks?
22:14:33fowlplz keep compiles()
22:14:48DemosVarriount, yes, often. And c++'s std::deque is usually implemented in just such a way
22:15:03renesacVarriount, http://stutzbachenterprises.com/blist/implementation.html
22:15:10Araqgah, compiles() will stay for 1.0
22:15:13renesacthis data structure is very interesting
22:15:14VarriountDemos: Well, once nimrod has macro cffi support, you could always have a macro start a nimrod subprocess to compile something...
22:15:26Araqafter 1.0 is out I might replace it with something saner :P
22:15:50AraqVarriount: you can do that already
22:15:55AraqstaticExec ftw
22:16:09Demoswell in my case I need it to compile in a given context, I think I could replace it with a data structure that tracks just what I need at compile time though
22:16:30VarriountAraq: You wanted me for something?
22:16:41Matthias247Demos: yeah, and in most places std::deque and std::vector are soo much faster than std::list :-)
22:16:55Skrylarwill staticexec allow you to check for the existence of methods?
22:16:55Demosyeah lists are just bad
22:17:13Skrylari was thinking about using compiles() earlier to see if a given type had its own hash function defined
22:17:32DemosSkrylar, the "correct" way to do that would be to use a typeclass
22:17:46reactormonkAraq, how again do you activate mixed?
22:17:54Skrylar'typeclass' isn't in the manual :(
22:18:02Skrylaroh. spaces.
22:18:05Varriountreactormonk: 'mixed'?
22:18:36AraqVarriount: yeah, can you explain this:
22:18:50Araq Fail now
22:18:52Araqbabel-core/C/x11 (reSuccess -> reInstallFailed)
22:19:47Skrylarah the 'user defined type class' section still says TBD
22:23:01DemosSkrylar, look in the devel docs
22:24:02VarriountAraq: Let me check. It might have occurred when I was developing something else.
22:24:31renesac[19:14:03] <Araq> linked lists are essential for memory managers though <-- IIRC jemalloc uses parent-less RB trees
22:25:37Skrylarbubble sort all the things
22:26:20Araqrenesac: linked lists are *natural* when you split up by allocated sizes
22:27:25renesacright, I never implemented a memory manager, but I have quite a bit of prejudice agains linked lists, and love dynamic vectors
22:27:28renesac^^"
22:28:47VarriountThis may be my niavety talking, but wouldn't dynamic arrays/vectors have progressively worse times when resizing?
22:29:01VarriountSince memory has to be reallocated and copied?
22:29:04SkrylarVarriount: amortized
22:29:07flaviuVarriount, yes but there are clever tricks
22:29:11renesacVarriount, but you resize in progressively larger chunks
22:29:19Skrylari assume he means storing the headers in the dynamic buffer
22:29:24flaviuI personally like bitmapped vector tries
22:29:51flaviulog_n performance, were n is the size of each subvector thing
22:30:15renesacand I'm not sure if after 4kb you can't just ask for the kernel a new page to append to your vector (or I'm dreaming here?)
22:31:39Araqin fact when you keep doubling the capacity the overhead is factor 3 amortized for "add"
22:31:52Araqbut I forget how the proof works
22:31:56Araq*forgot
22:32:37renesacVarriount, and if pauses are a concern (soft real time) you can alloc a new vector but only copy a bit of the old vector each new insertion
22:33:15Varriountrenesac: Yeah, I'm just raising theoretical questions.
22:33:21renesacthen you are amortizing the operation explicitly
22:33:48Araqrenesac: that complicates the lookup slightly though
22:33:57VarriountOf course, after a certain point, if you're storing hundreds of thousands of items, you should probably ask yourself if a custom data structure is needed...
22:34:21renesacAraq, yeah, and uses more memory, and is slower to copy bit by bit than all at once
22:34:26*filwit quit (Quit: Leaving)
22:34:31renesacbut probably still better than a linked list
22:34:38renesac:P
22:35:28Araqdunno, linked lists are not that bad on x86 with its crazy prefetching logic
22:35:54Araqwe had a benchmark recently
22:36:13Araqmade all the points ref tuple[x,y,z] instead of tuple[x,y,z]
22:36:24Araqperformance was not affected ;-)
22:36:52flaviuAraq: Do you have a gist for it?
22:37:11renesacdepends on how the memory allocator packs all that allocations together too
22:37:23Araqflaviu: dom96 knows the details
22:37:36renesacand if you need anything like random access, linked lists are out
22:37:50Demosan x86 will only prefetch if you have a more or less constant stride though...right
22:37:54renesacAraq, it was the ParticleBench?
22:38:05Araqthe opengl bench
22:38:13dom96Yeah, that was it
22:38:40renesacand not really a linked list, more like a vector of pointers
22:39:00renesacor you have tried a linked list?
22:39:36Araqit was a vector of pointers, that is right
22:39:53Araqbut I can't see how a linked list does much worse
22:40:01Araqthe indirection is the same
22:40:32Demosit probably really depends on how stuff is layed out in memory, the prefetcher is likely to get tripped up once you start adding and removing stuff from the middle of the list
22:40:47Araqyeah a good point
22:41:04Araqthe linked list is fast as long as you don't edit it
22:41:05Demosthis is the one part of the optimization manual I actually read :D
22:41:10renesacDemos, a vector don't like random insertions an deletions too
22:41:29renesacI would say it also depends on what other allocations you make while building your list
22:41:31Demosrenesac, right, but with a vector they will not change the fact that memory is contigous
22:42:11renesacyeah
22:42:22renesacthat is why array hash tables are much faster than chained hash tables
22:42:45renesacbecause the linked list nodes are all around the memory, not contiguous
22:42:51Demospretty mcuh
22:42:52renesaclike in the array hash table
22:43:07VarriountHm. Could you have some sort of bitfield to mark areas of a vector that are empty, for o(1) deletion?
22:43:16Demoshash tables are going to destroy your prefetcher no matter what
22:43:29renesacDemos, not really
22:43:33renesacquadratic probing for the win
22:43:33DemosVarriount, yes. boost calls it a sparse vector
22:44:03renesacor even linear probing, or a mixture of both like cbloom did
22:44:04Demosrenesac, right but like you are accessing more or less random locations
22:44:13Demosbecause that is what a hash does
22:44:16renesacyes, the first jump is random
22:44:23renesacthe others need not to be
22:44:49Demostrue, but they are unlikely to be constant. And each jump you are only using a little bit of the cache line
22:44:52renesacan chained hash table or array hash table has at least two random jumps
22:45:01renesacan open adressing hash table can have only one
22:45:04Demosunlike in a vector where you are likely to go throguh the whole cache line
22:46:48renesacwell, if you are searching for random things, and you have a large number of it, you have to hit random places of memory anyway
22:47:01Demosyeah ofc
22:47:07renesacif you are seaching in order, you should have stored in an ordered data structure
22:47:24renesaclike a b+tree
22:47:40Demosor an ordered vector
22:47:47renesacyeah
22:48:01renesacif you aren't inserting or deleting things
22:48:20DemosI think boost has something like boost:flat_map that is a std::vector<std::pair<const key, value>> that it just bsearches through
22:53:33*ddl_smurf joined #nimrod
22:58:43renesacVarriount, you have sparse tables implemented this way, but you need to consult the bitfield for each array indexing operation, so it isn't perfect
22:59:52renesacsparse tables are a bit more than you asked though
23:00:14*ddl_smurf quit (Quit: ddl_smurf)
23:00:38renesacyeah, I think I never saw anything like that...
23:01:16renesacusually you use an invalid value for some field of your vector elements to mark it
23:01:37renesacas deleted
23:03:13*nppdelfin quit (Ping timeout: 240 seconds)
23:05:11*ddl_smurf joined #nimrod
23:11:29Varriountrenesac: But the drawback of directly using an invalid value is that you can't use the invalid value for anything else.
23:11:50*io2 quit (Remote host closed the connection)
23:12:59Demosthe bigger (and related) drawback is that it is hard to generealize
23:13:02*io2 joined #nimrod
23:13:28*BitPuffin quit (Ping timeout: 265 seconds)
23:13:58renesac^
23:14:23VarriountSigh.. In a perfect world, there would be some mythical data structure with O(1) read and write properties.
23:14:41renesacthat is sorted and with no overhead
23:15:16renesacbecause hash tables already have O(1) rw
23:15:28renesac(amortized)
23:15:39renesac(on average)
23:15:59SkrylarHuh. Well thats a neat idea. I just thought about how you could abuse yEd to be a GUI editor. At least when you can't get a real one
23:16:27*Skrylar scribbles and returns to hash algorithm hell
23:16:52VarriountSkrylar: Hahll?
23:17:07renesachash algorithms are fun
23:17:26renesacI would be messing with it if I had not other things to do
23:18:24Skrylarrenesac: i'm just aggravated because there are things i want to do, and there is this infinite pile of dependencies
23:19:00Skrylarwhich means stopping, diagramming it out, making sure its all properly coded
23:19:15Skrylaranyhow, interruption over
23:19:16renesacright
23:24:31Demoswell Skrylar make sure to put whatever you are doing on babel
23:25:08Skrylarthat sounds like a thing i don't know how to use
23:25:24Skrylari shoved the unicode stuff on github at least
23:26:48*jbe quit (Quit: Leaving)
23:27:02*filwit joined #nimrod
23:27:33filwithey renesac: just rescanned the logs and noticed some questions you asked that I missed before
23:28:51filwitrenesac: yes, my 'part' macro will handle both nimrod 'proc' and custom 'func'. In fact, 'func'/'init' mostly exist specifically to be outside of 'part' (to emulate the same behavior for any type)
23:30:40filwitrenesac: the general-purpose OOP macros which will be eventually part of the standard libs will probably not really effect how the OOP is handled in Nimrod (although, this IS possible because OOP just means "combine objects + virtual table"), it's more about saving typing when you're using OOP designs
23:32:28filwitrenesac: keep in mind that there's only general plans for these general purpose OOP libs. There are a few candidates (i'm working on one of them), but ultimately which macros are included in the stdlib are to-be-determined by Araq
23:34:08filwitrenesac: so the specific behavior and syntax of the stdlibs OOP macros is still largely open to discussion, last i heard. Mostly it's just about the first person who makes a decent well-rounded version of them and convinces boss-man to accept the PR :P
23:35:32renesacright, I will take a better look once it is completed
23:35:47renesacthe screenshot didn't look bad though
23:36:21Araqyeah but the boss-man is constantly learning new tricks and now wants compile time function pointer table generation
23:36:33Skrylarwell a vtable isn't necessary for OOP.. its just a practice of thinking in terms of objects instead of procedures </pedantic>
23:37:02Araqand then we could even ditch multi methods and simplify the language
23:37:25fowlcompile time functino pointer table - for multi dispatch?
23:37:33Araqyes
23:38:21*ddl_smurf quit (Quit: ddl_smurf)
23:39:10fowlkewl
23:40:48*xenagi joined #nimrod
23:42:04Skrylarpoor openoffice.. i think its been like 6 months since i actually had to use writer for something outside of curiosity oO
23:42:18Keletdom96: Is Aporia v0.1.1.0 recommended for release version of Nimrod? I'm getting an error on set_upper on ~master of Aporia
23:44:44filwitKelet: probably need to compile with devel
23:50:32fowlKelet, nimrod 0.9.2 isnt recommended
23:51:11Araqfowl: can you please report now what doesn't compile anymore with devel?
23:51:59fowlyes, ill check it out
23:52:15fowloh i remember this was a problem: importc: "sf_$1" isnt supported
23:52:46Araqthat's gradha's bug lol
23:52:56AraqI told him it's a bad idea
23:53:33Araqlet me see
23:55:15renesacanother question I asked was: just allowing '=' would solve the problem for your macros
23:55:22renesacfilwit,
23:55:48renesacAraq, one can't nest (;), so it isn't currently really an option
23:55:56Araqallowing '=' seem problematic for the current grammar and doesn't solve much
23:56:30renesacwell, it would make proc defining macros look native
23:56:46renesacbut yeah, I made this suggestion only if it was easy to do with the current grammar
23:58:29flaviuIs getting a type error on foo != nil a feature?
23:58:32renesacanother option I thought would let declare procs as 'proc name(params) type {.pragmas.}: body'
23:58:42renesac(notice the lack of ':' between params and type
23:58:56renesac), but it would be adding special cases to the grammar...
23:58:58filwitrenesac: thanks for the input. Though I considered that and discarded it because it's not consistent with if/else/etc like : is. Ultimately this discussion has come to a close. I'll be making a experimental parser (complete with Kate color coding) to try out these ideas and find any flaws. Once that's done, we can argue about the specifics in a more concrete way, and if it turns out to be a much more popular syntax overall perhaps it will eventually replace th
23:58:58filwite existing on after it passes enough scrutiny.
23:59:36renesacif, else, etc aren't assigning to any variable
23:59:59renesacvar, proc, type are (given a broad definition of variable)