<< 27-05-2014 >>

00:03:21*EXetoC quit (Quit: WeeChat 0.4.3)
00:17:49*flaviu1 quit (Ping timeout: 240 seconds)
00:32:50*q66 quit (Quit: Leaving)
01:06:54*nande_ joined #nimrod
01:12:54*hoverbear joined #nimrod
01:13:29*flaviu1 joined #nimrod
01:13:30flaviu1dom96: Sorry, couldn't resist :P
01:17:33Skrylarhrmm
01:17:40SkrylarSublime 3 still isn't out? o_O
01:19:05caioariedehi guys! can someone give me some light? I'm getting "out of memory" error here: https://gist.github.com/caioariede/9986786099eef53e093a#file-gistfile1-nim-L72
01:19:35caioariedeI think I'm missing something but I can't figure out what I have to do
01:21:30flaviu1caioariede: No idea, but try dumping the object using repr
01:22:08flaviu1echo(repr(tpl)) will print out the object graph for tpl
01:24:06caioariederepr entered a infinite recursion loop :o
01:27:48flaviu1Yeah, it does that sometimes. I don't know about the layout of your thing, but line 68 looks suspicious.
01:27:55*def- joined #nimrod
01:29:08flaviu1since in the other cases you do something like getInt or getString, but in that case you just do .len without any getSeq. I think that should just crash though...
01:31:21caioariedeit's not the case, the error only happens when I pass ctx to another proc
01:31:43caioariedeit works otherwise: https://gist.github.com/caioariede/9986786099eef53e093a#file-gistfile1-nim-L84
01:32:12*Jesin joined #nimrod
01:32:31caioariedeit seems to get collected by the gc or something like this
01:34:30flaviu1GC sounds reasonable. "TAny keeps a non-traced pointer to its wrapped value and must not live longer than its wrapped value"
01:36:43fowlwell tany is not meant to be passed around like that
01:38:03caioariedewhat I could do to keep it alive?
01:38:22flaviu1caioariede: What is your end goal?
01:40:27caioariedeI need a key-value dictionary where key is a string and values are TAny, and pass it through procs without losing them
01:42:54fowlcaioariede, TAny is like a view on an object, thats why it takes a var T to instnatiate it, and why the TAny cant live longer than the object it views
01:44:53fowlcaioariede, if all you need is a small subset of data types i would just use PJsonNode from the json module
01:45:00flaviu1I don't know how Araq'd do it, but the way I'd do it as a variant type.
01:45:23flaviu1fowl: He also wants to store regular object refrences
02:12:00*freezerburnv quit (Quit: freezerburnv)
02:32:56fowlnot sure
02:48:17*bjz joined #nimrod
02:55:49*bjz quit (Ping timeout: 252 seconds)
03:09:19*xenagi joined #nimrod
03:11:05*def-_ joined #nimrod
03:14:14*def- quit (Ping timeout: 252 seconds)
03:22:20*flaviu1 quit (Ping timeout: 255 seconds)
03:31:30*xenagi quit (Read error: Connection reset by peer)
03:40:04DemosVarriount: ping
03:47:47*flaviu1 joined #nimrod
03:48:03*flaviu1 quit (Remote host closed the connection)
04:16:29*OrionPK joined #nimrod
04:34:11*caioariede quit (Ping timeout: 252 seconds)
04:51:31*xtagon quit (Ping timeout: 276 seconds)
05:04:56*New-Guy joined #nimrod
05:05:06New-GuyHowdy fellas.
05:05:30New-GuySorry about all the questions I've had lately. Some of which easily answered.
05:06:31New-GuyBut got another question - I tried making a type T_Flag_Incomplete = tuple[symbol: expr, value: expr], but the compiler complains that expr isn't a concrete type.
05:07:27New-GuyI can just use tuple[symbol: expr, value: expr] in my templates, but I wanted to keep it clean, so does the compiler support a static type like that?
05:07:49New-GuyAgain, I tried looking around and a few different ideas, but couldn't find anything.
05:07:52New-GuyThanks in advance.
05:15:02*Demos quit (Read error: Connection reset by peer)
05:17:09fowlexpr doesnt exist at runtime
05:23:00New-Guyfowl: And no compile-time only types?
05:34:09fowlNew-Guy, PNimrodNode
05:35:43fowlNew-Guy, templates are substitution-based, like #defines, it doesnt make sense to store an expression in the context of a template, you want macros
05:36:15New-GuyToo simply to warrant a macro.
05:36:42SkrylarNew-Guy: compile-time only types are implicit :P
05:36:53SkrylarIf you only use the type in macros, it gets cut out by dead code elimination AFAIK
05:37:05New-GuyYeah, no problem.
05:38:00fowlNew-Guy, its not simple if you're doing anything more than substitution
05:38:19New-GuyAll of the templates making use of the types are one line long. Simply substitution.
05:41:45New-GuyLike I said, I don't need to use types, it was just cleaner that way. Thanks for the explanation, though.
05:46:16*hoverbear quit ()
05:47:00New-GuySo how are you guys doin'? Don't see much casual chat around here.
05:47:34Skrylarright now is largely sleeptime
05:48:20New-GuyAh, only 2 am over here.
05:57:29fowlNew-Guy, we talk more off topic on #nimrod-offtopic
05:57:51New-Guyfowl: Ah, I see. That explains it.
06:06:33Skrylarright now its just me ranting about how google improperly implements imap over there <_<
06:07:13NimBotAraq/Nimrod devel ee0cbbe Charlie [+0 ±1 -0]: renamed UINT in windows.nim to WINUINT
06:07:13NimBotAraq/Nimrod devel e02abc6 Varriount [+0 ±1 -0]: Merge pull request #1233 from barcharcraz/fixedWindows... 2 more lines
06:09:59*Varriount|Mobile joined #nimrod
06:10:26Varriount|MobileHi New-Guy
06:11:48Varriount|MobileNew-Guy: It's true - most of the developers here live in Europe
06:12:34New-GuyVarriount: Ah, so it's dead in the middle of night for you guys.
06:15:43*boydgreenfield joined #nimrod
06:17:15Varriount|MobileNew-Guy: Well, I live off the East coast of the US, but yeah. Here it's 2:16 in the morning, and for the others it's 4-6
06:18:13Varriount|MobileI'm just awake because of my weird sleeping habits
06:19:56New-GuyVarriount: Yeah, East Coast and bad sleeping habits here as well.
06:32:26*Skrylar headscratches
06:32:34Skrylarits always weird when its cheaper to buy a new license than buying an upgrade
06:34:38*bjz joined #nimrod
06:40:17New-GuySkylar: What is it?
06:43:37SkrylarNew-Guy: upgrading a mail client
06:44:38Skrylari'm one of those weirdos who still uses desktop mail clients
06:50:56Skrylarsleeeeeeep time.
06:51:10Skrylari'll go back to finishing up the nimrod texture loader tomorrow afternoon
07:01:48*New-Guy quit (Ping timeout: 240 seconds)
07:14:38*ehaliewicz quit (Remote host closed the connection)
07:20:35*boydgreenfield quit (Quit: boydgreenfield)
08:11:19*kunev joined #nimrod
08:26:08*Varriount-Mobile joined #nimrod
08:29:49*Varriount|Mobile quit (Ping timeout: 240 seconds)
08:30:18*Varriount-Mobile quit (Ping timeout: 240 seconds)
09:10:49*core-ix joined #nimrod
09:13:16def-_Hi
09:13:26def-_Is this supposed to compile?: var x: proc (x, y: bool): bool = `and`
09:42:49*nande_ quit (Read error: Connection reset by peer)
09:49:43*freezerburnv joined #nimrod
10:05:32dom96def-_: I think it should.
10:05:36dom96def-_: report it on github
10:22:40*dLog_ joined #nimrod
10:24:19*dLog quit (Ping timeout: 240 seconds)
10:53:49VarriountGood morning dom96
11:00:15*freezerburnv quit (Quit: freezerburnv)
11:00:29dom96hey
11:12:32*EXetoC joined #nimrod
11:31:31*dymk quit (Ping timeout: 240 seconds)
11:31:47*freezerburnv joined #nimrod
11:34:02EXetoCso did implicit symbol binding ever become the default? the manual claims that explicit binding is rarely needed now
11:37:05EXetoConly this is being considered "proc fail[T](x: varargs[T, `$`]) = discard" when unittest.test invokes 'fail', which is also defined as "template fail*" in unittest.
11:40:18EXetoCit's a little cryptic if you're trying to call the former, and you don't know that the latter exists: "Error: cannot instantiate: 'T.
11:41:11EXetoCexplicit binding in the unittest module solves this
12:13:08*untitaker quit (Ping timeout: 258 seconds)
12:19:07*untitaker joined #nimrod
12:34:52Araqdef-_: no, this shouldn't work, 'and' is a builtin
12:35:12Araqand in general a 'procvar' annotation is necessary for this to compile
12:50:49BitPuffinhey is this getting merged or what? https://github.com/Araq/Nimrod/pull/1228
12:51:32BitPuffinAraq: do we want the ability to use cast as a.cast[type] to be consitent with generic procedure invokations?
12:53:20Araqno we don't want that
12:53:39AraqBitPuffin: if it makes you happy I'll merge it. Reads like Javadoc though
12:54:15Araqpublic Foo(Bar bar) // creates Foo using Bar bar.
12:55:43BitPuffinAraq: well not all of it, but it's better than nothing :)
12:56:29AraqI dunno. If you don't want to read, how does MORE text help?
12:56:36BitPuffinI do want to read
12:56:57BitPuffinI'm all for being as clear as possible
12:57:30BitPuffinparMessage is a good example of something that needs clarification
12:57:43Araqso rename it instead
12:57:59BitPuffinyeah that'd probably be good
13:00:02BitPuffinWhat's a good name.. echoParMsg?
13:00:37Araqfinding good names takes longer than writing it in the first place
13:00:49BitPuffinyes
13:00:51BitPuffinagreed
13:00:54BitPuffinbut it's worthwhile
13:02:07BitPuffinI'd say something like echoParserMessage or printParserMessage but I have a fealing you would think that's too much to type :P
13:02:43Araqtyping is not my major concern, I'm pretty good at typing
13:02:49AraqI don't want to *read* it
13:03:08AraqI want the compressed versions of things
13:03:28Araqso that I can overview much and have a better chance of spotting the bugs
13:04:30Araqanyway you convinced me
13:04:38BitPuffinwell you have the advantage of already knowing what everything (but zahary's code) does. Us others who want to help spot bugs need to be able to guess what is happening without knowing the details
13:04:48Araqand we should have a renamefest
13:04:52Araqhowever
13:04:53BitPuffinI think we should
13:05:07Araqthat means cherrypicking becomes harder
13:05:14BitPuffinelaborate
13:05:15Araqand branches will cause many conflicts
13:05:25AraqI have 2 branches I'm working on
13:05:41Araqplus we have the master vs devel distinction
13:05:42BitPuffinwell, not if you merge it back into your wip branches
13:05:51BitPuffinthat's usually what I do
13:06:07BitPuffinto avoid the conflicts
13:06:18BitPuffinand yes, it will be work, but it is worth it
13:06:39BitPuffinthe result will hopefully be more PRs :)
13:06:56AraqI agree
13:07:00BitPuffinAraq: would you be opposed to moving for example the code generators in to its own subdirectory, and the vm, to get more organization?
13:07:18AraqBitPuffin: that's what I have in mind too :P
13:07:23BitPuffinokay nice!
13:07:31BitPuffinI thought you hated subdirectiories :)
13:07:48AraqI do, but I'm willing to attract fresh blood
13:07:53BitPuffinhaha
13:08:11BitPuffinwell again, they can be painful when you already know what every file is etc
13:08:20BitPuffinbut not for someone trying to grok what is what
13:08:59*dymk joined #nimrod
13:09:07Araqwell I think nobody uses 'spawn' yet
13:09:16Araqso I might as well merge my branch into devel
13:09:50BitPuffinnew_spawn?
13:10:46BitPuffinwhat's new about it :P
13:11:43BitPuffinalso when are we letting stuff like sempass2 become just sempass
13:13:17Araqhey, it's the 2nd semantic pass
13:13:27Araqwhy should it become sempass ?
13:13:30BitPuffinoh
13:13:39BitPuffinI thought it was a "new" semantic pass
13:13:43BitPuffinto replate the old one
13:13:44BitPuffinhaha
13:13:46BitPuffin:D
13:14:07BitPuffinwell okay docgen2 then
13:14:12BitPuffinthat's what I think it is isn't it?
13:14:30BitPuffinyeah by the looks of it it is
13:17:32BitPuffinwhile we are at it renaming things we should try and go through the stdlib and rename things to be consistent everywhere, and deprecate the old ones, or something like that
13:18:05BitPuffinwatch the world burn, and things
13:27:34*core-ix left #nimrod ("Leaving...")
13:29:19*Demos joined #nimrod
13:30:49*darkf quit (Quit: Leaving)
13:32:13AraqBitPuffin: new_spawn is a branch which has an improved thread pool and 'spawn' supports return types
13:32:32Araqthe return value is transformed into a promise automatically
13:33:28Araqfurthermore it adds a 'parallel' statement which makes Cilk look like a toy :P
13:55:07*Demos quit (Ping timeout: 240 seconds)
14:13:15*caioariede joined #nimrod
14:29:02*nande_ joined #nimrod
14:29:59*Jehan_ joined #nimrod
14:30:58BitPuffinAraq: awesome
14:31:14BitPuffinAraq: improved thread pool eh, goodbye go
14:31:23*bjz quit (Ping timeout: 252 seconds)
14:33:39Jehan_Araq: Why rename futures to promises? Unless they're actually promises now?
14:34:53AraqJehan_: we already have Future for the async stuf
14:35:02AraqPromise is for inter thread communication
14:35:16AraqI'm not happy with the names but thought long about better ones
14:35:21Araqand didn't find any
14:35:22Jehan_Yeah, but it's confusing if it's not what promises are generally understood to be.
14:35:39Araqwell it's not too late
14:35:46Araqso make a suggestion
14:35:50Jehan_Mind you, I'm also not happy with research slang becoming actual programming language vocabulary … :)
14:36:05Jehan_Depends on what a promise currently is?
14:36:22Jehan_I haven't looked at the code yet, I just scanned through the IRC logs.
14:36:39Araqit's a ptr with a condition variable and a pointer to the owning thread
14:36:46Araqyou can read from it
14:37:03Araqthis blocks and transfers the value into your heap
14:37:04Jehan_Umm. That's the implementation, it doesn't tell me what the semantics are?
14:37:19Jehan_So, basically, it is a future?
14:37:49AraqI don't enough official defintions to tell
14:37:55Araqbut yes, I think so
14:38:18Jehan_Hmm. I'll have to have a look at the code, I think.
14:38:27Araqit's also very close to a dataflow variable
14:39:41Jehan_I've generally been in favor of using "task" instead of "future", like what C# does (assuming that it's actually appropriate, technically not all futures are tasks, though 99% of implementations are).
14:40:03Jehan_Task is a term that people can understand fairly easily, unlike future (which is just CS slang).
14:40:09Araq"task" doesn't convey the right idea
14:40:27Jehan_That may be, I'll have to look at the actual code to see what it does precisely.
14:41:20Araqa task would be some function pointer + data (closure) that you pass to the thread pool and tell it "work on that"
14:41:46Araqpromise is simply a wrapper around the returned result
14:42:31AraqDelayed[T] would be an alternative name but that's not even a noun
14:43:13Jehan_Araq: Okay, any need to expose that part to the user?
14:43:31Jehan_I mean, the usual purpose of a future is to have it filled in by some computation.
14:45:37Jehan_Wait, is what you have actually a synchronization variable?
14:46:04*flaviu1 joined #nimrod
14:47:13*freezerburnv quit (Quit: freezerburnv)
14:47:31Jehan_Brb.
14:48:24AraqJehan_: yeah but it can only be assigned once and read once
14:51:25BitPuffinAraq: is there a way that I can cheat with the generics and implement the matrix dimensionality using peano numbers (to work around generic limitations) but still have the same api, ie where you just say var m: TMatrix[int, 3, 3]
14:51:34BitPuffinTRM maybe?
14:53:08BitPuffinI hardly think anyone would be happy to type var m: TMatrix[int, TSucc[TSucc[TSucc[TZero]]], TSucc[TSucc[TSucc[TZero]]]]
14:53:26Araqyou can hide it with a macro
14:53:31Araqbut it remains a bad idea
14:53:52BitPuffinyeah I don't like it
14:53:59BitPuffinbut I think it might not freak out
14:54:07BitPuffinlike static[T]'s atm
14:55:21Jehan_Araq: Yeah, but then it's really not a future, either. More a low-level construct that can be used to emulate futures, synchronization variables, etc. (at least in a limited way).
14:56:34Jehan_I guess after all, promise may still be the closest approximation to what it actually is. :)
14:57:02Jehan_I still don't like the terms "future" and "promise", regardless of their accuracy.
14:57:12AraqI even thought about naming it Doom[T] ...
14:57:26BitPuffinlol doom
14:57:28BitPuffin:D
14:57:39Araqbut programmers have no humor
14:58:17BitPuffinguess I am no programmer then
14:58:19Araq(we already have gorge and slurp and nobody likes these names)
14:58:19Jehan_Hmm, DeferredValue? Too long?
14:58:26flaviu1Araq: Have you seen caioariede's question? Even though he isn't here, I'm curious how you'd implement that
14:58:42Jehan_Araq: Well, my only problem with them is that they pollute the main namespace. :)
15:02:25Araqflaviu1: dunno, perhaps I would hack the TAny implementation to support copying. but I usually use strings for C#'s Object root
15:04:19*kunev quit (Quit: leaving)
15:06:17AraqJehan_: I should name it a GoVariable :P
15:06:30OrionPKaraq - how would i invoke a C++ static member function in nimrod
15:06:31Jehan_Araq: Heh. :)
15:06:56AraqOrionPK: simple. wrap it like this: importc: "Foo::bar"
15:07:00Jehan_Araq: Or SingleElementNonReusableChannel. :)
15:07:05OrionPKahh, beautiful thanks
15:07:25OrionPKaraq what do you think of a library that makes a kind of DSL for defining C++ interfaces
15:07:44OrionPKas an alternative to pragmas
15:08:16Araqlets see: C++? check. DSL? check. Interface? check.
15:08:43Araq--> awesome idea.
15:08:58OrionPKalso for C
15:09:02OrionPKIm thinking 2 libs
15:09:16Araqyou need more buzzwords
15:09:34OrionPKlol
15:10:34AraqJehan_: using a *channel* for synchronization is already a misnomer
15:10:46Araqwhen you think about it
15:10:49Jehan_Why?
15:11:05Jehan_It has an infinite consensus number, similar to CAS.
15:11:06Araqwell ok, not really a misnomer
15:11:49Araqbut a channel is almost a queue and in my book message passing is inherently asynchronous
15:12:03Araqmaybe I'm weird
15:12:30OrionPKaraq e.g. http://pastebin.com/KvUhHSK8
15:12:44OrionPKgenerates the importcpp/importc's necessary
15:12:47Jehan_channels can block on read (and write, if they have finite capacity).
15:12:50AraqOrionPK: I like it. make it happen
15:13:10OrionPKaraq alrighty, I'll work on it as I have time. I started on it a couple days ago
15:14:27Jehan_In fact, unbounded channel functionality is a superset of semamphore functionality.
15:14:40Jehan_A semaphore is equivalent to a channel of unit.
15:15:15Araqa channel with a capacity of 1 is weird, IMHO
15:15:17flaviu1Jehan_: Got it. SuperSemamphore? :P
15:15:47Jehan_A channel with a capacity of 1 is actually a pretty useful construct for a number of things. :)
15:16:23Jehan_flaviu1: sem_post() is equivalent to write(chan, ()), and sem_wait() is equivalent to read(chan).
15:16:25Araqyes, but it's a weird "channel"
15:18:29Araqor maybe not ... I conflate channel with queue
15:19:08*Roin_ quit (Ping timeout: 252 seconds)
15:22:17*freezerburnv joined #nimrod
15:26:11Jehan_A one-element channel can be used to emulate a mutex. :)
15:26:22Jehan_write() = lock(), read = unlock().
15:26:55Jehan_Channels are in principle an enormously powerful synchronization mechanism.
15:27:25Jehan_Also in general less efficient than more specialized constructs, of course. :)
15:28:00Araqyeah and that's even preferable because you shouldn't use shared memory to communicate but use communication to share memory ...
15:28:15*Araq is confused
15:28:40Jehan_It depends on what you're trying to accomplish.
15:28:47*boydgreenfield joined #nimrod
15:29:10AraqI'm trying to recall Go's claim
15:30:05Jehan_Araq: Go's claim is bogus.
15:30:16Araqoh really?
15:30:20Araqnow that's news :P
15:30:38Jehan_They say that they use channels to ensure that only one thread (well, goroutine) has access to data at any time.
15:30:50Jehan_The problem is that their channel implementation doesn't ensure that at all.
15:31:00Jehan_Unless they fixed it since I last looked at it.
15:31:03Araqyeah I'm aware
15:31:41Araqalso they make it very easy to pass closures to goroutines
15:32:16Jehan_Well, they assume that they have a shared memory GC, which DOES make such things easy.
15:32:25Araqheck they encourage it as a goroutine cannot return anything
15:32:34Jehan_Of course, it's not easy to write an efficient shared memory GC.
15:32:45Araqthat is not the problem
15:33:06Araqclosures enable innocent looking sharing like nothing else
15:33:39Araqit's an invitation to data races
15:34:46Jehan_You can make that safe.
15:35:27Jehan_Data races are in principle trivial to avoid.
15:35:54Jehan_Ensure that (1) each memory location is associated with exactly one lock and (2) ensure that the lock has been acquired before accessing the location.
15:36:10Jehan_The only tricky part is making this efficient.
15:36:19Jehan_Which can be accomplished in a number of ways.
15:36:37Araq(2) is a huge problem
15:36:45flaviu1Jehan_: It can never be more efficient than not having a data race
15:37:18AraqI get your point
15:37:26Araqyou can easily check for (2) at runtime
15:37:32Araqbut this is overly restrictive
15:37:33Jehan_Araq: Yup.
15:37:44Jehan_Not so much restrictive as lazy. :)
15:37:57Jehan_But even a runtime check beats having a data race.
15:38:04Araqoften I can ensure it's not racy without acquiring that lock
15:38:16Jehan_It's not like we statically check array accesses all the time.
15:38:22BitPuffinOrionPK: make sure that you mention webscale and big data somewhere in the lib
15:38:33Jehan_Araq: Yup, a lot of the stuff can be optimized away.
15:38:45Jehan_In fact, that's something that I'm working on for my own project.
15:39:00Araqit's like making me insert assert i < a.len for every a[i]
15:39:17Araqotherwise a[i] fails at runtime
15:39:36Araqbut hmm
15:39:53Araqoh I see
15:40:12Araqyou don't do it this way
15:40:17Jehan_Incidentally, there are ways to alleviate the problem with closures.
15:40:29Jehan_Such as making a copy of the environment.
15:40:44Araqinstead you insert the acquire operation, right?
15:40:50OrionPKbitpuffin what? I dont see how it's buzzywordy :P
15:41:02Jehan_Araq: You mean like Eiffel does?
15:41:06OrionPKyou guys are all talking about promises and futures, thats way more buzzwordy :P
15:41:33Jehan_No, I mean literally guaranteeing that there is a check before every memory access where I can't statically guarantee that it's safe.
15:41:49Jehan_The trick is to statically guarantee it is often as possible.
15:42:02Jehan_Which also necessitates a language design to support that.
15:42:28Araqcopying the closure changes the semantics
15:43:01Jehan_Yup.
15:43:08BitPuffinOrionPK: seriously, big data and webscale not buzzwords? :P
15:43:13AraqJehan_: ah so that's what Eiffel does :P
15:43:21BitPuffincloud is not a buzzword
15:43:25BitPuffinBY THAT LOGIC
15:43:41AraqI barely remember
15:43:44Jehan_But only for non-functional languages, and one can argue that this is actually truer to the functional way of doing things.
15:44:04Jehan_Didn't C# have to fix its closure semantics recently because of a related problem?
15:44:22Araqyeah for some meaning of "related"
15:44:46Jehan_Araq: Eiffel (SCOOP) acquires any "separate" object that's passed as an argument to a routine when the routine is called and the object hasn't been acquired yet.
15:45:23AraqEiffel's Scoop is fundamentally broken
15:45:33Jehan_Somewhat simplified, the actual semantics are a bit more involved (especially once you start considering precondition).
15:45:46Jehan_Araq: In what way?
15:46:00OrionPKBitPuffin I just want a less painful way to wrap all those C++ libraries out there ;)
15:46:03Jehan_The original spec had holes, but you could mostly infer the intent.
15:46:13OrionPKthat has nothing to do w/ big data / web scale
15:46:21Araqthey map existing stuff to some bizzare concurrenc model and claim it's simple because they ended up requiring few new keywords
15:46:32Jehan_I also think it tries being too hard being minimalist.
15:46:37BitPuffinOrionPK: yeah, we need to make a variant of c2nim that generates output for your lib :)
15:46:44OrionPKagreed :)
15:47:02OrionPKonce I have a prototype working I'll put it up on github
15:47:03Jehan_Ah, yeah. I agree with that. Minus the bizarre part, the underlying concurrency model is mostly straightforward.
15:47:08OrionPKhopefully we can get some contributions
15:47:38Jehan_At the same time, it was about the only language at the time that actually tried avoiding data races.
15:47:50Jehan_MInd you, it still is only one of very few that actually does.
15:48:05AraqJehan_: yeah, ok, that's a result of their rather poor documentation
15:48:12Jehan_Java and C# in particular are little better than assembly language in that regard.
15:49:13Jehan_Neither is C++, but then C++ doesn't aspire to be high level.
15:49:19flaviu1Wow, UTF8 is pretty nice, you don't even have to care that its utf8, it keeps all the weird stuff above 0x7F
15:49:33Araqflaviu1: yes.
15:49:35Jehan_flaviu1: Yeah.
15:49:48Jehan_There were a few articles recently about that, even.
15:50:26Jehan_Speaking of which, I'm happy that Nimrod defines a string as basically a sequence of 8-bit characters.
15:50:52Araqyou're quite alone with this opinion
15:51:05flaviu1Jehan_: Do you have a link to one of those articles?
15:51:59Jehan_Araq: Possibly. I still think that burdening one of the core data types in a language unnecessarily with all the unicode semantics is inherently broken.
15:52:09Araqbut I'm happy too and I know more about character sets than the people who dislike nimrod's solution
15:52:23Jehan_A language design should be a pretty static document and the Unicode standard is too much of a moving target, just for starters.
15:52:56Araqthe unicode standard will be dumbed down eventually
15:52:57Jehan_Even if it weren't, weighing down the core datatypes with all the unicode stuff does not convey any benefits.
15:54:07Jehan_I'm honestly not sure what the benefits of strictly enforcing a constraint that each string is valid utf8 would be.
15:54:21Jehan_Or whatever it is that people want.
15:54:34flaviu1Why should it be an issue that the unicode standard changes? I doubt they make major changes all the time, so it just requires rerunning the code generation scripts.
15:55:07Araqflaviu1: the tables are HUGE though and growing
15:55:47Jehan_flaviu1: Just implement isUpper(), for example. That's actually pretty simple.
15:55:47Araqat the same time many human languages are moribund
15:55:56flaviu1The computer doesn't care, the code generation can deal with it.
15:56:07Jehan_Or try to benchmark StartsWith() in C#.
15:56:25flaviu1Jehan_: Implementing toUpper() might be a good learning experience.
15:56:27flaviu1Not arguing against strings being byte sequences, I like that.
15:56:58Jehan_Don't get me wrong, comprehensive Unicode support is a good thing to have.
15:57:21AraqtoUpper itself is a flawed concept...
15:57:34Jehan_Araq: Yup. See ß and friends. :)
15:57:58Jehan_Which is why I specifically said isUpper(). :)
15:58:31Araqah
15:59:22Jehan_I actually had that discussion with a Google interviewer once.
16:02:47flaviu1I'm not allowed an \n in a character? That's atypical, usually \n is the newline character, not \n\r or \r\n
16:03:41Araqflaviu1: we don't really abstract away the different newline styles and so don't need to distinguish between "binary" and "text" files
16:04:06*hoverbear joined #nimrod
16:04:37Jehan_flaviu1: I think \l is what you need instead.
16:04:52flaviu1I know, still a bit odd
16:04:52Araqno you should really use "\n"
16:05:26Jehan_Araq: can't use \n in a character literal.
16:05:43AraqJehan_: yes. that means he shouldn't use a character literal.
16:05:49Araqbut a string literal
16:06:09Jehan_Depends on the application.
16:06:16flaviu1Araq: Well, I need to use a char literal, so I'm using a '\l'
16:06:35Jehan_For parsing strings character by character, it'll have to be '\l'.
16:07:15flaviu1^ Exactly my usecase
16:09:55Araqno
16:10:06Araqfor parsing strings you need to do something like:
16:10:29Araqif s[i] == '\C': inc i; if s[i] == '\L': inc(lineNumber); inc i
16:12:05Jehan_What's the difference between \L and \l?
16:14:37flaviu1Case insensitive I think
16:26:05SkrylarAraq: i had to make a binding for setjmp/longjmp because jpeg and png use those for error handling; do you want the module for those functions in std?
16:40:24AraqSkrylar: hmmm nimrod uses that too for its exception handling
16:40:32*shodan45 joined #nimrod
16:40:42Araqmaybe we can make it compatible
16:41:30Araqbut no, I don't want it in the stdlib, I already have those :P
16:43:33*Matthias247 joined #nimrod
16:46:57Skrylari didn't see public ones when i was grepping :\
16:53:17*q66 joined #nimrod
16:53:17*q66 quit (Changing host)
16:53:17*q66 joined #nimrod
17:17:11*Johz joined #nimrod
17:17:45*icebattle quit (Remote host closed the connection)
17:21:35*shodan45 quit (Quit: Konversation terminated!)
17:31:11*brson joined #nimrod
17:40:38AraqSkrylar: well they are not public
17:47:32*hoverbea_ joined #nimrod
17:50:51*hoverbear quit (Ping timeout: 252 seconds)
17:54:24BitPuffinAlright I will do what nobody else has done
17:56:14BitPuffinthat we've needed for a while
17:58:55*Joe_knock joined #nimrod
17:58:58Joe_knockHello
17:59:34BitPuffinhey Joe_knock
17:59:37BitPuffinwelcome if you are new
18:00:05Joe_knockHello BitPuffin, thank you. Yes I am. I've come to Nimrod via Python
18:01:13*Demos joined #nimrod
18:05:31Araqhi Joe_knock welcome
18:06:07*Demos quit (Ping timeout: 245 seconds)
18:06:31BitPuffinI shall update the htmlgen and dom modules
18:06:41BitPuffinand possibly write a css module
18:06:58Joe_knockAraq: Thank you
18:07:16Joe_knockWhat is/are the current primary use-cases of nimrod?
18:07:55BitPuffinJoe_knock: it's general purpose
18:08:58Joe_knockBitPuffin: Can I find some type of list that demonstrates where nimrod is being used in production?
18:08:59BitPuffinyou could write an operating system, a web browser, a web application, a game, a photo editor, AI, etc
18:09:07BitPuffinanything :)
18:09:21BitPuffinI dunno, is there a list currently?
18:10:49dom96http://forum.nimrod-lang.org is a good example
18:10:55Joe_knockI'm keen on learning a "close-to-machine" language and I like the idea of porting over my understanding of the python syntax
18:11:04BitPuffindom96: no it's not because it looks like a ballsack :P
18:11:15BitPuffinand is terribly insecure
18:11:18BitPuffinbut either way
18:11:24dom96BitPuffin: Hey, I designed it :(
18:11:32BitPuffindom96: hugs?
18:11:52dom96BitPuffin: Nope. Never gonna forgive you for that </3
18:11:58BitPuffindom96: your blog looks good though, did you design that?
18:12:05dom96BitPuffin: Yes!
18:12:11BitPuffindom96: so you got better :)
18:12:30Araqit's more secure than most commercial software that I've seen, but that means nothing :-)
18:12:31dom96But nah I kid. I agree the forum design looks meh.
18:12:46dom96But I wanted to get it up and running quickly
18:12:49BitPuffinAraq: yeah sure :P
18:12:53BitPuffinI can imagine
18:12:54Joe_knockIs Araq Andreas?
18:12:57BitPuffinyes he is
18:13:06Araqit used to look cool but it didn't age well ...
18:13:08BitPuffindom96: yeah it's obviously rushed :)
18:13:29Araqthere are designs which keep looking good and then there are other designs
18:13:41dom96It's a practical design :P
18:13:45BitPuffinI can't imagine the forum ever looking good lol
18:13:49dom96It serves its purpose
18:14:10Joe_knockTo you guys that designed the forum, if it user friendly over design, screw the design, ill choose something i can use better over a fancy bootstrap thing
18:14:25dom96See ^ :D
18:14:25BitPuffinwell alright it's not the most shitty looking thing in the world
18:14:31BitPuffinsome things are ok-ish
18:14:33BitPuffin:P
18:14:39dom96Time to add more <blink>!!!
18:14:45BitPuffindom96: he said IF it's user friendly :P
18:15:21AraqJoe_knock: I'm afraid there is no list of users who use it in production and this list is very small anyway
18:15:21dom96I'll make it so that it only uses blink tags for your IP
18:15:33Araq*this list would be
18:15:35dom96It'll still be user friendly, but it'll also be BitPuffin unfriendly :D
18:15:40Joe_knockwhat is the status of concurrency with regards to nimrod? Are you guys building that in like the Go and Rust folk?
18:15:50BitPuffindom96: it doesn't even have search :P
18:16:19dom96BitPuffin: Google.
18:16:22Jehan_BitPuffin: That's what Google is for. :)
18:16:54AraqJoe_knock: yes. it pushes the state of art. (Jehan_: feel free to disagree vehemently)
18:16:55Jehan_Honestly, the only thing I'd like to see improved is account management. Actually using the forum to, like, write stuff is just fine.
18:17:00BitPuffinthat is literally the most pathetic reply I've gotten twice in a long time
18:17:07Jehan_Araq: Heh. :)
18:17:14BitPuffinand why does it tell me how fast it generated the page
18:17:29BitPuffinJehan_: kind of a difficult thing to get wrong though
18:17:32Jehan_Araq: I'm not disagreeing, but that's a low bar. The state of the art is a disaster area. Anything remotely sane is an improvement.
18:17:40dom96BitPuffin: why not? Reddit does too
18:17:43BitPuffin<textarea></textarea> done
18:18:07BitPuffindom96: the forum isn't reddit, and reddit doing it is stupid as well
18:18:17BitPuffinYAGNI principle dom96, YAGNI
18:18:18dom96BitPuffin: Don't diss reddit bro
18:18:32BitPuffinreddit sucks dick
18:18:34BitPuffin:P
18:18:47Joe_knockWell if you guys don't mind, it seems like the community is relatively small, so perhaps I could contribute positively and not be a cog who gets ignored concerning the future of other languages.
18:18:48BitPuffinall software and websites suck today okay
18:19:05BitPuffinJoe_knock: yeah that's the advantage of our community indeed
18:19:28BitPuffinAlthough Araq can be a grumpy cat at times, however, with good reason
18:19:38dom96Jehan_: Do you think Araq's promises should be merged with my async futures?
18:20:03Jehan_I honestly haven't looked at the async stuff yet, so I can't tell.
18:20:22dom96IMO users will find the subtle differences between the two confusing.
18:20:33BitPuffintrue
18:20:36Araqthe difference is hardly subtle
18:20:43Araqthey are completely different things
18:20:45Jehan_My actual usage of Nimrod for practical work mostly involves batch processing, which takes a bunch of data, feeds it through an algorithm, and spits something out.
18:20:53BitPuffindom96: did you publish the article yet btw?
18:21:05BitPuffinJehan_: nimrod should be more than fine for that
18:21:07Jehan_So, sockets etc. are not a priority for me at the moment.
18:21:13Araqthe only confusing thing is that C++ uses the same terms and does it differently
18:21:14BitPuffinthey exist though
18:21:19Jehan_BitPuffin: It is. That's why I'm using it.
18:21:19BitPuffinwhen you'll need those
18:21:23BitPuffinoh wait
18:21:27BitPuffinthought you were Joe
18:21:29BitPuffinhaha
18:21:31BitPuffin:P
18:21:43Joe_knockaah crap, no tutorials for Jester either. Perhaps I should tinker and write a few.
18:21:48BitPuffinAraq: that is no good, we have to think of our own buzzwordy name
18:22:11Araqso make a suggestion. We all failed to come up with something better
18:22:16Jehan_BitPuffin: You don't have to sell me on it. I'm a person who uses Nimrod for actual paid work, after all.
18:22:17dom96BitPuffin: Araq has put an embargo on it :P
18:22:37BitPuffinAraq: hyperdimensional vow
18:23:09dom96Joe_knock: That would be awesome :)
18:23:12BitPuffinor maybe just vow
18:23:15BitPuffinlol
18:23:17BitPuffin:P
18:23:18Joe_knockJehan_: You're obviously using Nimrod to process something equivalent to massive hordes of data?
18:23:36Jehan_Joe_knock: No, actually small amounts of data.
18:23:43BitPuffinJehan_: well that's why I said I thought you were Joe
18:23:44Joe_knockoh shit, dom96 is the author of Jester haha
18:23:48Jehan_Mostly tooling for a project.
18:23:49BitPuffinathorwise I wouldn't be selling it to you
18:23:58dom96Joe_knock: indeed :D
18:24:10BitPuffinAraq: pledge
18:24:12Joe_knockWhat are the benefits that nimrod brings? Jehan_
18:24:36Jehan_Joe_knock: More productive than doing it in C++.
18:24:38BitPuffinanticipate
18:25:13Jehan_Joe_knock: I need a statically typed, imperative, garbage-collected language where I'm not drowning in boilerplate.
18:25:26Jehan_There aren't a whole lot of options in this area.
18:25:26BitPuffinAraq: prospect?
18:25:31*boydgreenfield quit (Quit: boydgreenfield)
18:25:51Joe_knockAs long as it serves you well, Jehan_
18:25:56BitPuffinAraq: prognose?
18:26:04BitPuffinl :p
18:26:17AraqBitPuffin: 'plegde' is too positive; 'promise' has the benefit of implying "yeah ... right"
18:26:18flaviu1Does nimrod really have opportunities for boilerplate except for C bindings?
18:26:35Joe_knockCould an application that manages electronic flying devices be considered "soft real-time" ?
18:26:59BitPuffinAraq: what about vow then, that's short even
18:27:04BitPuffinso you should like it
18:27:18Jehan_flaviu1: I want to *avoid* boilerplate.
18:27:19flaviu1Joe_knock: If the electronic flying device doesn't get any commands for 200ms, will it crash?
18:27:44flaviu1Jehan_: I know, but I'm curious if there are any cases where you can't avoid it
18:28:08BitPuffinJoe_knock: what kind of flying device do you mean
18:28:09Jehan_flaviu1: It depends on your definition of boilerplate.
18:28:12Joe_knockflaviu1: Based on a flight height of at least 100 meters, no. Perhaps only take-off and landing will be the issue.
18:28:35BitPuffinJoe_knock: in the worst case you can also skip using a GC
18:28:36Joe_knockBitPuffin: Like an RC helicopter
18:28:56flaviu1soft real-time basically means that you configure an interval, and the GC limits its pauses to that interval. http://build.nimrod-lang.org/docs/gc.html has more detail
18:28:59BitPuffinthat way you can even get the memory usage down if that's a scarce resource
18:28:59Jehan_flaviu1: I'm thinking of stuff like http://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming)
18:29:36AraqJoe_knock: depends on your spec entirely. ask me in a few months again, then I can tell you more.
18:30:00Joe_knockflaviu1: So soft real-time is a provision, it isn't a constraint of nimrod?
18:30:27Araqwould I personally use Nimrod for *hard* realtime systems? yes, but then I know what I do ;-)
18:30:27BitPuffinAraq: homework? XD
18:30:49BitPuffin"The Nimrod Homeworks"
18:31:08BitPuffingoal maybe
18:31:19Joe_knockI take it you guys are not yet experiencing oss politics.
18:31:31BitPuffinJoe_knock: hmm?
18:31:55Joe_knockBitPuffin: Eg. People disagreeing on every decision
18:32:17BitPuffinJoe_knock: we all disagree at times, but Araq is our almighty dictator so he always has the final say
18:32:22flaviu1Joe_knock: We have quite a bit of bikesheding, but we also have a dictator
18:32:49Joe_knockhttp://www.btbytes.com/notebooks/nimrod.html "For me, Nimrod is a vast upgrade over dynamic languages like Python and Ruby without sacrificing a whole lot of expressiveness." Fascinating
18:32:54Jehan_Until Guido runs him over with a bus or however that goes. :)
18:33:23*def- joined #nimrod
18:33:41Joe_knockAah the great Guido.
18:33:41flaviu1Joe_knock: I'm not sure what you're asking, but you can get the GC to effectively take as long as it'd like by setting the max pause high.
18:34:08flaviu1Also, 200ms is quite a large overestimate, according to the docs it can do as low as 2ms pause times
18:34:37Joe_knockflaviu1: I assumed that when the site said soft real-time that it meant that as a constraint, but Araq has clarified that it can be used for "hard" real-time too.
18:34:38Jehan_flaviu1: There is a bit more explanation necessary.
18:35:17*nande_ quit (Read error: Connection reset by peer)
18:35:44BitPuffinJoe_knock: it can be used for anything, as you don't even *have* to use the GC
18:35:52*BitPuffin doesn't always use the GC
18:36:28Araq--gc:none gives warnings when you use a language construct that involves the GC
18:36:35*def-_ quit (Ping timeout: 252 seconds)
18:37:03BitPuffinplus for controlling a little helicopter or whatever wouldn't you know the environment you are working with with the sensors etc? So why would you need the heap
18:37:05BitPuffin:P
18:37:42BitPuffinI guess it depends on what sort of data you get back
18:37:53BitPuffinI'm not too familiar with coding for those
18:38:16Jehan_Araq: What would you say about Pending[T] instead of Promise[T]?
18:38:26BitPuffinthat's a pretty good word
18:38:27Joe_knockUsing the sensor data to re-calibrate the helicopter position would be important.
18:38:37Joe_knockBut let me not get ahead of myself there :P
18:38:54flaviu1I didn't know that --gc:none warns, awesome
18:38:56BitPuffinJoe_knock: yeah but I mean when you poll from the sensor, do you always get the same amount of data?
18:39:07Araqflaviu1: that's new with 0.9.4
18:40:26Joe_knockYes, that would be correct. The quantity of the data won't change, it's just getting the sensor data to return as many ping calls with feedback as possible
18:41:08BitPuffinJoe_knock: yeah, so you could just use the stack then, no GC needed
18:41:28AraqJoe_knock: when you have the memory just use the GC and be happy. I can't imagine it will cause problems for your use case.
18:42:15Joe_knockthanks for the feedback guys.
18:42:29Araqping Varriount
18:42:31flaviu1Does RTTI still work with the GC off?
18:42:49Araqflaviu1: yes
18:44:09*boydgreenfield joined #nimrod
18:45:11BitPuffinAraq: should I just go crazy with the existing htmlgen module or should I make a html5gen module instead
18:45:40Araqthe htmlgen module is widely used. don't touch it.
18:45:56*BitPuffin didn't think anyone uses it
18:46:04BitPuffinokay so html5gen it is
18:46:32Araqokay. I'll kill you if you use immediate templates/macros.
18:46:45Araqthey caused lots of problems
18:46:48BitPuffinthat's a bit harsch
18:47:02Araqfits your character
18:47:03Jehan_Heh. :)
18:47:20BitPuffinthe only thing I'm doing is updating it to support all the html5 tags :P
18:47:22flaviu1Whats wrong with macros?
18:47:34BitPuffinAraq: I'll use generics of course
18:47:41Jehan_Immediate macros, he said, and I was wondering the same thing.
18:47:41BitPuffinand do fancy stuff
18:48:41BitPuffinfits my character to die o.O?
18:48:41*boydgreenfield quit (Ping timeout: 255 seconds)
18:49:09BitPuffinI actually barely use macros, dom96 is the guilty one there, and he's apparently not having problems, which I find hard to believe
18:50:06Araqnothing but *immediate* macros don't participate in overload resolution and exporting immediate macros like 'a', 'p' is asking for trouble
18:50:22BitPuffinahahahaha
18:50:26BitPuffinI bet
18:50:58BitPuffinbut what about using immediate macros to define the tags?
18:50:59Jehan_Yeah, I remember running into problems with trying to define an immediate template with varargs.
18:51:37AraqBitPuffin: never ever export an immediate symbol. what you do locally doesn't matter
18:51:46flaviu1BitPuffin: I've done stupider stuff with macros than dom96 has :P
18:52:16BitPuffinAraq: well why is everything in htmlgen module an immediate macro then XD
18:52:17Joe_knock"I'll kill you if you use immediate templates/macros." :O
18:52:29Jehan_Speaking of which, is it worth requesting an alternative syntax to "from foo import nil"?
18:52:32BitPuffinJoe_knock: see what I mean about grumpy cat? :)
18:52:37Jehan_Or is that set in stone?
18:52:40Joe_knocklol
18:52:51BitPuffinJoe_knock: I hope he doesn't talk like that to his kids
18:52:52AraqJehan_: what's wrong with it?
18:53:28Joe_knockfrom ... import is pythonic
18:53:43Joe_knock"from ... import ..."
18:53:57Jehan_Araq: Umm, several things, starting with having to use a separate import statement for each module.
18:54:35*Jesin quit (Quit: Leaving)
18:54:43Araqso use your own privateImport macro :P
18:54:45flaviu1Jehan_: Some whitespace doesn't hurt anything
18:55:07Jehan_Araq: Yeah, that's where I ran into problems with variadic templates.
18:55:17Jehan_Which is why I remembered and mentioned it.
18:55:20Araqinteresting
18:55:35Jehan_Basically, immediate templates can't have varargs parameters.
18:55:45Araqyep
18:56:00Jehan_And if I don't make them immediate, the compiler tries to resolve the module names.
18:56:07Araqyou can use a macro though
18:56:31Jehan_Okay. I may, if I feel strongly enough about it again at one point.
18:56:52Jehan_I decided to resolve the situation back then with just copying and pasting the import statement.
18:57:12BitPuffinAraq: I think what I'll do is to create an immediate macro that creates exported templates or something
18:57:28Araqthe compiler doesn't try to resolve module names anymore for 'expr' but the situation is ... hardly ideal
18:57:47Jehan_Heh.
18:57:50flaviu1Jehan_: The best solution may be to just put up with it. Macros for non-standard syntax is
18:57:54flaviu1't very good
18:57:59*boydgreenfield joined #nimrod
18:58:01Joe_knockJehan_: I dont know if you're a fan of fancy text editors, but I'm sure by using Sublime Text, it can autofill those words for you
18:58:12Jehan_Well, it's hardly the most urgent problem in the world.
18:58:57Joe_knockJehan_: when you say "import 1 module only" Do you mean that: "from foo import lib1, lib2, lib3, lib(x+1)" on the same line won't work?
18:59:02Jehan_Joe_knock: My concern was more with the readability of the code, less with having to type it.
18:59:17Jehan_Joe_knock: I was talking about "from foo import nil".
18:59:43Jehan_Which is sort of the same as "import qualified foo" in Haskell.
18:59:51dom96BitPuffin: write a new htmlgen module using the syntax Araq showed in his emerging langs talk
18:59:52Joe_knockWhat change would you propose? Jehan_
19:00:23Jehan_Note the "nil", which makes it different from: "from foo import x, y, z"
19:00:39Jehan_My complaint was about not being able to do "from foo, bar import nil".
19:01:13Joe_knockI see now. Okay that is a different situation
19:01:26AraqBitPuffin: I'm still surprised how good the old VM worked. And how much work the new VM was... but yeah, people run into macro bugs all the time.
19:02:22Jehan_Joe_knock: And it's … umm, not all that important. But I remembered that because of the immediate template stuff and since I had Araq around, I figured I might as well ask. :)
19:03:12AraqBitPuffin: I had to lookup "vow". can't be right for programming
19:04:03Araqand I'm afraid nobody except Jehan_ knows the definition of "promise" anyway :P
19:04:32Jehan_Araq: Yeah. As I said, I'm not a big fan of using CS slang.
19:04:47Jehan_Araq: The biggest offender in my mind is the type "unit".
19:05:01Jehan_Which makes a lot of sense if you're familiar with type theory, but totally confuses everybody else.
19:05:22Araqheh.
19:07:09wanHow about "PinkieSwear"?
19:07:47Araqthe biggest offender is C++'s "vector" for a flexible array
19:07:56fowlspeaking of macro bugs
19:08:05fowli made the vm crash yesterday
19:08:09Araqvectors in math are usually of a fixed size
19:08:23Araqfowl: so report it please
19:08:32fowlreporting issues is so 2013
19:08:44fowli'll report it on twitter and reddit
19:08:46Araqyeah, report it on the forum instead
19:09:33Araqbut start the post with "argh I forgot my password so I had to re-register"
19:10:32fowllol
19:10:48Jehan_Araq: vector isn't CS slang, though, it's just a misnomer.
19:10:52flaviu1Araq: Shouldn't nimrod's arrays be called vectors then? :O
19:11:34Jehan_I'm talking about terms that were developed in some paper in a context where they make sense, but are difficult to understand outside that context.
19:12:12Jehan_As to fixed size, umm, take K[[x]] as a vector space. :)
19:12:50Jehan_Or, well, just K[x].
19:13:26Joe_knockI remember vectors, that would be linear algebra
19:14:22*flaviu1 quit (Remote host closed the connection)
19:14:44fowlsweet
19:14:47fowli got issue #1234
19:16:07*flaviu1 joined #nimrod
19:17:56Araqfowl: you're the typical programmer :P using every single feature that nimrod offers. :-)
19:21:09*brson quit (Ping timeout: 252 seconds)
19:35:30flaviu1Any thoughts on syntax like `doSomething(_ + 1)` for lambdas?
19:35:39*onibaka joined #nimrod
19:35:56Araqhi onibaka welcome
19:36:13Araqflaviu1: we already have enough syntax for lambdas
19:36:33Araqmore sugar is the point of the upcoming => macro
19:37:28flaviu1I know, but I don't see how `_ + 1` could be implemented without compiler support
19:39:17Araqyou can always put it into a string literal, but yeah you're right
19:39:24Araqthat's currently not possible
19:49:05*boydgreenfield quit (Quit: boydgreenfield)
19:56:16Jehan_flaviu1: If you want short inline expressions, the sequtils.nim approach may be an alternative.
19:56:26flaviu1hmm, 'got (proc (GenericParam): auto), expected proc (char): bool{.closure.}'
19:57:03flaviu1Jehan_: Thanks, that might work
19:57:36BitPuffinreactormonk: how do I install your nimrod-mode?
19:57:42Jehan_The only problem I see with the sequtils.nim approach is that the variable naming needs to be consistent.
19:59:25flaviu1Jehan_: If I do that, I'd probably do a macro such that `fn: _ + _` works
19:59:40flaviu1But I wonder how underscores will behave
19:59:56Araqthe compiler rejects single underscores
19:59:58Jehan_Well, _ is not a valid identifier.
20:00:02flaviu1maybe using alphabet letters
20:00:36Jehan_That's why you may just as well use something like "it" for a single argument.
20:01:00Jehan_It's not really different from using "self" or "this" in single dispatch OO languages.
20:01:28flaviu1Jehan_: But in some cases I might have multiple variables, like a fold
20:01:31Jehan_A convention for multiple arguments would be nice.
20:01:38Jehan_Yeah, I was getting to that. :)
20:01:49BitPuffinAraq: it would be awesome if you could create your own customized effect tracikng
20:02:08flaviu1so I'd probably do a, b, c, ...
20:02:12Jehan_val1, …, valn or arg1, … argn are obvious candidates, but a bit verbose.
20:02:18AraqBitPuffin: you mean override the inference rules to something unsound? :P
20:03:16Jehan_Hmm, doesn't Groovy use "it" too to allow you to elide a single argument parameter list?
20:03:17BitPuffinAraq: so for example, in linagl, I would like to track if a matrix variable has been become unorthogonal, then I could make super cool optimizations, such as when calling the inverse proc on a matrix that is orthogonal, it simply transposes it instead
20:04:17BitPuffinAraq: basically I somehow create my own effect called orthogonal, and mark procs that ruin the orthogonality as making it fals, and orthogonalize as setting it to be orthogonal
20:05:08Araqthere is a point in life where bug prevention ends up taking much more time than fixing bugs
20:05:20BitPuffinwell this is for optimization
20:05:40BitPuffinwithout having to have more types
20:05:42flaviu1Araq: And I want to annotate data structures with performance information, so that if I say that something has N performance, it fails to compile if it turns out that it actually uses another method with N^2 performance
20:06:43BitPuffinAraq: I guess it doesn't have to be an effect, but a compiletime-only variable associated with a type
20:07:57Araqflaviu1: that's what the D guys try to do
20:08:26Araq"you must not overload 'in' when it takes O(N) time"
20:09:25flaviu1That's a bit insane, my version would be nothing more than statically checked verification.
20:09:39Araqthat's not our way. Often I know N is small and O(N) is meaningless.
20:09:50flaviu1s/verification/documentation/
20:09:50BitPuffinI wonder if something like that can be created with macros
20:10:24flaviu1BitPuffin: Yes, but it'd be easier if I had a way to apply a pragma to all procs
20:10:57BitPuffinflaviu1: are you talking about your thing or my thing
20:10:57flaviu1If a hole appears, it becomes useless
20:11:00Araqflaviu1: you can do that with .push iirc
20:11:23flaviu1BitPuffin: My thing
20:11:24flaviu1Araq: Neat, I'll look into it later
20:11:52Araqflaviu1: there is a much easier way to do it though
20:12:17flaviu1hmm?
20:12:18Araquse the effect system to prevent recursions
20:12:26Araqit's a planned feature
20:12:45Araqgives you something different but workable
20:13:23Araqyou only need to check nested for loops then to estimate the O and carefully inspect every 'while' loop
20:14:18fowlhow can i importc a generic type in the cpp gen
20:15:25Araqfowl: you can't
20:15:27flaviu1fowl: http://en.wikipedia.org/wiki/Name_mangling#Standardised_name_mangling_in_C.2B.2B
20:15:39BitPuffinAraq: so do you think compiletime only properties to types is possible to implement with macros?
20:16:12AraqBitPuffin: we already have these, might be a bit buggy for now though. Check out the manual
20:16:36BitPuffinoh
20:17:04BitPuffinwhat are they called?
20:17:37Araqgenerics with default values
20:17:48Araqor something like that
20:18:28fowlBitPuffin, link me when u find it plz
20:19:08Araqtype Foo[T; S = 3] = Bar[T]
20:19:09BitPuffinI'm lookin
20:19:20BitPuffinAraq: and those are mutable?
20:19:47Araqno, what does that mean?
20:20:51BitPuffintype TMatrix[T; R, C: static[int]; O = false] = ...
20:22:49BitPuffinproc orthogonalized[T, R, C, O](m: TMatrix[T, R, C, O]): TMatrix[T, R, C, true]
20:22:55BitPuffinwell
20:22:58BitPuffinguess it doesn't really matter
20:23:13BitPuffinsinec I don't mutate
20:24:24fowlAraq, this module makes heavy use of macros, templates, tables and seqs at runtime and compiletime, and everything seems to work :D https://bitbucket.org/fowlmouth/entoody/src/502e02abd9932a933ad5c35da58a094c668616fb/src/entoody.nim?at=master
20:24:24BitPuffinAraq: but in a case where someone would have a matrix library that does mutate, ie the matrices on the heap, when they have proc orthogonalize(m: PMatrix)... = m.type.O = true ...
20:24:49BitPuffinfowl: did you go hg? :D
20:25:02fowlno
20:25:11fowli dont know hg any more than i know git
20:25:30flaviu1BitPuffin: Main usecase for bitbucket is the free private repos
20:25:37BitPuffinflaviu1: I know
20:29:17Araqfowl: ok ... that doesn't mean it's a good idea though ;-)
20:29:35BitPuffincan't seem to find it in the manual
20:29:40BitPuffinare you sure it is documented?
20:30:47*brson joined #nimrod
20:32:09*boydgreenfield joined #nimrod
20:41:35*freezerburnv quit (Quit: freezerburnv)
20:41:36*ehaliewicz joined #nimrod
20:42:36*eigenlicht quit (Ping timeout: 240 seconds)
20:48:04fowlAraq, what do you mean? its nice to have for debugging info
20:51:36*filwit joined #nimrod
20:52:20BitPuffino/ filwit
20:52:44filwithey folks, is there a reason deriving a ref type from another causes an error? bug? or something else?
20:52:50filwitheya BitPuffin
20:53:12filwittype Foo {.inheritable.} = object ...
20:53:20filwittype Bar = ref object of Foo ...
20:54:04filwit# causes segfault or sometimes some odd behavior
20:55:34filwitwoah, damn. 324 issues... i remember when there was just two pages..
20:56:44BitPuffinfilwit: how's the website coming along?
20:57:23filwitgood, i meant to have everything done last weekend, but got caught up doing other things
20:58:03*eigenlicht joined #nimrod
20:59:11filwiti'm shooting for this weekend. HTML/CSS is mostly done, just working on exporting some of the graphics still
21:00:43filwiti've just had a lot of other projects i'm working on, and Nimrod in general has taken a bit of a back-seat. Then when i want to work on it, I usually just start coding on my own Nimrod project instead of working on the web stuff
21:01:09BitPuffincool!
21:02:25*onibaka quit (Quit: onibaka)
21:03:03filwityeah, i'll try and stop by more often for encouragement on completing that. I usually try and avoid this place when I can't work on Nimrod stuff, cause I always end up spending an hour debating a minor syntax issue or something here
21:03:12*oddmunds quit (Ping timeout: 245 seconds)
21:03:37*seubert quit (Ping timeout: 245 seconds)
21:04:42BitPuffinhehe
21:04:46*seubert joined #nimrod
21:04:46*oddmunds joined #nimrod
21:06:32filwitMy brother and I are working on a game for a MS competition (Unity3D) which is taking most of my free-time ATM. But I've also been working on my Nimrod engine a lot, with the goal of making a 3D iOS/Android/OUYA/SteamBox game (before i complete the editor and release the code).
21:07:37filwitright now my heads been wrapped up in engine design and animation code. I had to write my own Blender exporter cause Assimp doesn't work with Blender multi-textures at all (or rather, Blender doesn't export Collada multi-textures)
21:13:31*filwit quit (Ping timeout: 240 seconds)
21:18:06*Varriount|Mobile joined #nimrod
21:21:01*DAddYE joined #nimrod
21:26:31*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
21:26:57*filwit joined #nimrod
21:27:45filwitstupid internet...
21:28:08filwitwas talking for a few minutes to no-one apparently :\
21:28:56filwit$90/month and the thing still drops at least 6 times a week on average
21:30:06*freezerburnv joined #nimrod
21:30:28filwitanyways, is Araq still around, or has he hit the hay already?
21:32:11*onibaka joined #nimrod
21:32:22Araqhi filwit
21:32:31BitPuffinfilwit: ah cool, I wonder if there is a way to get the multi textures in there
21:33:01filwitoh, great, hi Araq
21:33:01EXetoCfilwit: 1gb/1gb is it? :p
21:33:01dom96yo filwit
21:33:05filwitdamn, everyone at once :D hi all
21:33:13EXetoC*gbit
21:33:45filwitAraq: is my earlier question a bug or expected behavior? (can't make 'ref object' derived of another object)
21:34:42BitPuffinafaik ref object should be no problem
21:34:49BitPuffinbut what do I know really, I mean REALLY
21:35:52filwitBitPuffin: i'll be releasing a Blender exporter with my engine stuff eventually. You can find the current code on my brother's ReignSDK repo now though (https://github.com/reignstudios/ReignSDK/tree/master/Tools/BlenderPlugins) it supports multi-textures, animations (no curve-handles yet), and a bunch of other stuff.
21:36:21Araqfilwit: my guess is that your problem is something else
21:36:21filwitAraq: no, i did a very simple test (Foo/Bar level stuff) and it caused a segfault
21:36:38filwitAraq: but it did also behave a bit differently when i made my OOP macros export the code
21:36:53filwitAraq: so i'm not entirely sure. Are you saying it should work?
21:37:08filwitAraq: if so, i'll do more tests, and report any bugs i find.
21:37:19Araqit's worth reporting either way
21:37:34BitPuffinfilwit: well if it is just collada then shouldn't you try and get it upstream with blender=
21:37:36BitPuffin?
21:37:44Araqtbh I'm not sure what ref + .inheritable means :P
21:37:55Araqwhy not inherit from TObject?
21:38:19filwitbecause my OOP macros don't spit out a TObject.. they just spit out a `type T = ref object`
21:38:33BitPuffinlike real men
21:38:48filwitso i'm extending to spit out `type T = ref object of U`, but it fails
21:39:37filwityes BitPuffin, real men are direct, and don't need to pre-define the object when all we need is a ref variant :P
21:40:05filwitEXetoC: sorry, i didn't understand your question from earlier
21:41:21filwitEXetoC: oh, where you talking about internet speed?
21:42:30filwitEXetoC: idk, mines like 60Mbps (or however you say) but the router sux ass
21:43:11BitPuffin:)
21:43:12EXetoCreally expensive
21:43:35filwitEXetoC: it's Brighthouse networks (some south east company) but it's my only option here (not even Verizon FiOS yet)
21:44:07filwityeah, i hear internet in other places is cheaper, but gotta live with what's available i guess
21:44:49filwitit's not a huge deal really, just annoying when you're trying to upload something to a server and your connection drop the whole thing
21:46:16filwitBitPuffin: about collada, I kinda need my own format anyways, since I'm making an editor which will eventually be able to save files, and prefer to have control over things.
21:46:26flaviu1filwit: Can you make a git repo for your kate configurations?
21:46:56flaviu1I have a half-working indenter that I took from python and I'd like to send a PR
21:47:05*Jehan_ quit (Quit: Leaving)
21:47:08BitPuffinfilwit: ideally you want a binary format
21:47:55filwitflaviu1: awesome, I've already uploaded to here: https://gist.github.com/PhilipWitte/11196561
21:48:26filwitflaviu1: but i need to update that, as some of the colors and stuff aren't there yet, and I've made two more (Visual Studios 2013 light & dark colors)
21:48:33*Roin joined #nimrod
21:48:57flaviu1That's a gist though, I can't send a PR. I can set up a repo for it if you'd like.
21:49:12filwitBitPuffin: yes, binary format will come eventually, but XML for now (since my brother and I are sharing the format and C#'s JSON isn't the best)
21:49:23filwitflaviu1: ah, i see
21:49:31BitPuffinfilwit: yeah, much easier to start with
21:49:36BitPuffinfilwit: and to write dummy data for
21:49:44filwitflaviu1: okay i will make a official git repo for it tonight
21:50:00flaviu1Thanks
21:50:34flaviu1I've been reading about sqlite, they claim it works as a file format. Have you considered that?
21:50:47filwitno
21:50:52filwitdon't know anything about it
21:51:18filwitBitPuffin: i'm considering making an JSON version (already started) over XML anyways, just cause i prefer the format
21:51:31BitPuffinfilwit: yeah
21:51:47BitPuffinfilwit:I wonder if yaml is fitting for that type of data
21:52:01filwitplus, it would be easy to make a JSON -> BSON converter for binary formats
21:52:23filwitif Nimrod doesn't already have something like that, it would be helpful for more than just my project
21:52:36AraqI'd use sqlite
21:52:40Skrylari talked about a 'pandoc for data' thing a while back
21:52:42BitPuffinI wouldn't
21:52:54filwiti guess i'll have to look into sqlite
21:52:57AraqBitPuffin: why not?
21:53:13BitPuffinAraq: well I guess it depends on the kind of game
21:53:31BitPuffinAraq: But I don't really think storing stuff like vertex data in a relational database is a good idea
21:53:32flaviu1I haven't done much with SQL, but it seems like fun to program in
21:53:56AraqBitPuffin: if the alternative is XML ...
21:54:09BitPuffinAraq: however perhaps things like level structure etc could be fitting
21:54:26BitPuffinyou could do something where the metadata is in sqlite and the actual data is in binary files
21:54:35BitPuffinthat would probably work quite well
21:54:35flaviu1BitPuffin: Why not store vertexes in sqlite?
21:54:39Araqa component model is already close to a relational model
21:55:00Araqand most games are heading for a component model
21:55:03filwitflaviu1, i've only done simple things with SQL.. but i wouldn't call it "fun" unless your idea of fun is playing MS Excel :P
21:55:16BitPuffinflaviu1: why not store music samples in sqlite
21:55:27*freezerburnv quit (Quit: freezerburnv)
21:55:32BitPuffinflaviu1: why not store pixel data in sqlite
21:55:33Roindid somebody just compare an SQL database with MS Excel?
21:55:36flaviu1BitPuffin: Ok, so store the vertex structure as a binary blob.
21:55:37Roingeez...
21:55:42BitPuffinflaviu1: yeah
21:55:54Araqhi Roin. glad you're still around
21:55:59RoinHeya Araq o/
21:56:03Araqwhat happened to underscore?
21:56:10Roinoh he sits right next to me atm
21:56:20BitPuffinLike I said, you could do something where you just store the metadata in sqlite (this object has this material, and it has a parent that is this object)
21:56:22RoinStill studying unlike me lol
21:56:24filwitRoin: yes i did.. probably shows my ignorance :P
21:57:16Roinfilwit: hm well while you can use MS Excel as a rudimentary database it is... not a database, MS Access is a database but Excel.. nope :P
21:57:33Roindatabase management system actually duh hoh
21:57:42filwitthe problem with storing Bitmaps, Sounds, etc in a SQL table (compared to the filesystem) is that it sux for content creators
21:57:44RoinAraq: I havent coded anything in ages, feel like I should do it again
21:57:51Roinso my brain doesnt dry out
21:58:12Araqfilwit: yeah, don't do that
21:58:20RoinAraq: I'm working as an IT/Infrastructure Specialist for SAP HANA and BWA, so I do lots of Linux and infrastructure stuff and sometimes a bit of scripting but not much
21:58:33Roinfilwit: databases are not meant to store such data
21:58:35BitPuffinI also don't know if I would use sqlite during the actual simulation etc
21:58:51BitPuffinI would probably store the base level metadata in sqlite, and then load it all into memory
21:58:59RoinYou can use them as a reference table as in where to find such data on the file system or w/e but you really shouldnt store the data itself in a database methinks
21:59:13BitPuffindoing a bunch of mutations in sql probably wouldn't be very fast :)
21:59:41flaviu1It isn't very hard to use multiple database files with sqlite, but the best approach might be to load it into memory so you get predictable performance
21:59:47*Roin used SQLite to store lots of temperature data from his smart meter to write a web based application that plots the actual electricity usage of my systems
21:59:53filwitwell it's "okay" for a release build where you want to stream data quickly (in which case, a database might be a performance benefit.. i think)
22:00:23Roinstreaming data sounds more like you want a high performance file system
22:00:33filwitbut for editing, it's silly. and when you consider that most games want the ability to mod nicely, it also doesn't make much sense
22:00:47filwitRoin, yeah i agree
22:01:03BitPuffinRoin: well we weren't talking about streaming data :) at least I wasn't :o
22:01:11flaviu1How would sql negatively impact modablity?
22:01:42filwitflaviu1: because it forces you to use an external tool to access/modify the data, rather than just the filesystem
22:01:59BitPuffinfilwit: well you have to use a text editor to modify an xml file
22:02:04flaviu1You can't use notepad, sure. But sqlite has a nice repl
22:02:06RoinBitPuffin: oh ok I was just thinking someone was doing stuff like life editing of a stream of data (video data for example) with persistance in between like TV stations do for example
22:02:16BitPuffinand you are gonna have a more difficult time finding the relevant stuff
22:02:20Araqflaviu1: it requires modders to know about SQL. And they don't.
22:03:02BitPuffinRoin: ah. No I was just thinking more like serializing your metadata for levels and game objects to an sqlite file
22:03:11BitPuffinand then load it all to memory
22:03:11flaviu1Araq: The modders that can't learn the very basics of SQL are the ones that won't be releasing any worthwhile mods
22:03:36Araqflaviu1: I use this argument myself, but in this case it is really wrong :P
22:03:39RoinBitPuffin: my experience if this results into one big table that has to be read through even loading the whole sql file into memory is slow in the end
22:03:47filwitBitPuffin, flaviu1: say i want to modify a single texture, with everything saved in a familiar format on a filesystem, i just open with Gimp/Photoshop and edit. but with a SQL system, i need to lauch a tool, duplicate the asset to a format Gimp can read, edit/save, then reimport that asset
22:04:15BitPuffinRoin: yeah I'd use my own binary format but I was trying to explain how Araq's suggestion is somewhat valid
22:04:24Roinoh ok
22:04:25flaviu1filwit: Fair enough, non-blob data is much better for sqlite
22:04:48BitPuffinfilwit: well that's why I say don't store vertex/image/sound data in sqlite
22:04:51Roinsince I didnt see the initial statement I'm totally with you anyway, just trying to throw in my 50 cent ;P
22:04:52BitPuffinthat's fucking dumb :D
22:05:07BitPuffinRoin: :)
22:05:16filwitBitPuffin: then what *would* i be storing in sqlite?
22:05:31flaviu1I would still store things like level data or gameplay state in sqlite, if only because I haven't really used it before
22:05:48BitPuffinfilwit: for the fourth time, metadata, level structure (this object has this material, this parent, these components etc)
22:05:58filwitsure i guess
22:06:05BitPuffin:D
22:06:07flaviu1At least its better than creating a new blob format and dealing with that
22:06:16filwitthough I'm happy with just JSON/BSON for that
22:06:25BitPuffinI think your own blob format is worth it in the end
22:06:27filwitcause one is human readable, and the other is optimized
22:06:32BitPuffinbut sqlite is probably a good thing to start with
22:06:34Roinfilwit: basically relational data... which results in text, numbers and so on that arent too big :P
22:06:36BitPuffinif you don't want to deal with that
22:07:13flaviu1filwit: You could implement json or bson exporting from sqlite
22:07:30flaviu1You could also use something like protobuf or capt'n crunch
22:07:30Roinhm in Python this was relatively easy
22:07:47Roinlike 5 lines to get data from sqlite, turn it into a datastructure that you could dump to json
22:07:57filwitflaviu1: what's the point of sqlite at that point tho? if BSON is alread binary, what does putting it into an SQL table accomplish?
22:08:27flaviu1You get to use the SQL language to manipulate the data
22:08:32BitPuffingetting a repl
22:08:35Roinin sqlite tables you can haz structure and relations and stuff, json does not know relations
22:09:19BitPuffinyeah
22:09:24Skrylarjson/bson have heirarchial relations and flexible schemas
22:09:27BitPuffinthe way you'd do it is to put in an id or something
22:09:36SkrylarSQL has fixed schemas and relationships are a little more indirect
22:09:37filwitmeh, not enough. Most of the actual data manipulation in that regards has to be done with the game editor anyways (to edit the internals) so adding a bit of extra file management isn't much
22:09:38BitPuffinwhich is more expensive to verify the integrity of
22:10:22Roinand you can haz indexes and other nice things
22:10:24filwiti'm just liking JSON/BSON approach, so i'll stick with if for now
22:10:37filwitbut i'll look into sqlite and stuff later, just to be sure
22:12:05*onibaka quit (Quit: onibaka)
22:12:08filwitAraq: you mentioned that my Monokai colors where too colorful for your tastes last time I showed you. What colors *do* you like?
22:12:32filwitAraq: i've added VS 2013 light and dark colors, and the dark is now my favorite. You like those?
22:13:01flaviu1The VS colors are very nice
22:13:55filwityeah, the light one is pretty good, but the dark one is just perfect IMO
22:14:42filwiti keep trying to switch just to try my other colors, but the VS dark is just my favorite. They did a good job picking those colors out
22:15:42Araqfilwit: I need to see a screenshot to be able to tell
22:15:53*boydgreenfield quit (Ping timeout: 255 seconds)
22:16:27filwitone sec
22:16:27flaviu1Araq: http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92/3286.VS2013Preview_2D00_UX7abc_2D002D00_2.png
22:17:30RoinHm I thought you were talking about a game lol
22:17:41Roinalready wondered what VS stood for
22:17:49Araqwhat's the topic again? colors for the new documentation?
22:18:13filwithttp://www.reign-studios.net/philipwitte/nimrod/kate/Syntax_VSDark.png
22:18:31flaviu1Araq: Kate color scheme
22:19:12flaviu1filwit: What KDE theme are you using?
22:19:20filwitAraq: :P i'm working on the new docs. shooting for having stuff to show this weekend (i know i said that about last weekend)
22:19:42filwitflaviu1: it's a modified Elementary Flat theme
22:19:57Araqfilwit: it's much better yeah. but I still prefer my own scheme
22:20:44flaviu1Araq: I'm looking for color schemes, mind sharing?
22:22:16*boydgreenfield joined #nimrod
22:24:25Araqflaviu1: no time for screenshots sorry, it's the "darknim" scheme in aporia
22:25:08flaviu1Thanks
22:26:38filwitholy crap that's a horrible color scheme, lol
22:27:17filwiti now know that we will forever be at odds in terms of colors if this is your preference, haha
22:27:29flaviu1I like colorful color schemes
22:28:28filwiti like colors which indicate types and stuff, like distinguishing varname/typename/property/function-call/etc
22:29:03flaviu1I wonder if there's some way to get Kate to use the compiler for highlighting information
22:29:16filwitbut beyond just being completely uniform, that color scheme is way to "stark white on pitch black"
22:30:04filwitflaviu1: there might be. though a better challenge would be to get Kate to suggest names based on semantics (like the D plugin someone wrote)
22:30:42flaviu1I know, I've been considering that. I'll probably do it in python though, I don't really want to figure out C++
22:31:02*noam_ is now known as noam
22:31:28filwitwhy not do it in Nimrod, then simply make a C++ wrapper where needed
22:31:46filwitwell.. i supposed that might not be possible if you need to start up the GC
22:32:21filwitthen again, they're doing it for Python, so it should be a similar challenge
22:32:53flaviu1Because nimrod and C++ don't have several modules I'd need, and I don't want to end up shaving yaks.
22:33:24filwitshaving yaks? term i'm unfamiliar with (though i can guess it's meaning)
22:34:02*filwit read that as "shaving _yanks_" at first
22:34:16flaviu1I've just reversed "yak shaving". The second result on google is pretty good, I had no idea what it was a month ago
22:41:18*Johz quit (Quit: Leaving)
22:41:31*def-_ joined #nimrod
22:44:38*def- quit (Ping timeout: 252 seconds)
22:47:21*perturbation joined #nimrod
22:48:03perturbationhi all... i'm working my way through the tutorials
22:48:07perturbationand I kind of have a dumb question
22:48:23filwithello. shoot
22:48:31perturbationhow do I know when to use methods (dynamic binding) vs proc's (static binding)
22:48:50dom96That is not a dumb question at all
22:48:53perturbationit seems like I could make overloaded procs and it should be able to look up which to use by object type
22:49:16EXetoCnot at runtime
22:49:18filwitwhen you want to invoke a overload from a "base object" reference
22:49:29EXetoC(polymorphism)
22:49:38Skrylarfilwit: yak shaving is when you have to do work so that you can do work so you can do the work you originally wanted to do
22:49:56filwitSkrylar: yeah, i looked it up and was pretty much what i was expecting
22:50:23filwitperturbation: let me make a simple gist for you real quick, to explain things. one sec
22:50:25flaviu1Its origin story is still interesting
22:50:46perturbationthanks filwit, EXetoC
22:51:02flaviu1I saw a guy on the reddit post say that we should replicate the python tutorial in nimrod, I think that's a good idea
22:51:31dom96we should write a "by example" tutorial
22:54:13flaviu1Yeah, by example is much faster and easier
22:55:07flaviu1GitBook is really nice
22:56:47filwitperturbation: https://gist.github.com/PhilipWitte/81f92d2da57d42109b43
22:57:10filwitperturbation: let me test that real quick, just to make sure i'm not lying to you :P
22:57:46perturbationheh, no worries... really conceptually I just need to wrap my head around it conceptually
22:58:48filwithmmm... well it doesn't work, one sec let me fix it before you study it..
22:59:44Araqgood night
23:00:00filwitlater
23:00:20filwitperturbation: okay, fixed it. now it compiles and works right
23:00:33perturbationthanks filwit
23:00:46filwitnp.
23:01:21Araqperturbation: simple. never use inheritance and then you never need 'method'
23:01:59perturbationwell I confess I am coming at this from a stone-age C perspective
23:02:11perturbationso structs are all I need really :D
23:02:41filwitperturbation: the key thing to note is that the list `things` is of the base type `Foo`, but since `Bar` is derived of Foo, you can add Bars to the list. Then when you call `baz` on them, it correctly select the appropriate overload based on their type (even though the references are all of type Foo, not Bar)
23:02:52EXetoCmakes sense. you just need the features that C has :p
23:03:02flaviu1perturbation: If you only use them as structs, you'll never need to use the method keyword
23:03:41perturbationfilwit: ohhhhh. Because I can make it either, *that*'s why it can't know which is which at compile time
23:04:38filwitperturbation: yes, exactly. When you have a list of base types (but potentially have derived types in that list), you need methods to correctly overload (at runtime) procedures
23:05:27Araqwell there are alternatives filwit
23:05:46filwitperturbation: though it's not *just* lists. You can also have just a `var f: ref Foo` and make it point to a `Bar`, then call `baz` on it and it will correctly call the right overload
23:06:01filwitAraq: yes, i know about procvars
23:06:11filwitAraq: i'm just explaining methods
23:06:19Araqyeah sure
23:06:50flaviu1Araq: The only way to process the `adfs"rawstring"` sugar is with a indefinite lookahead, right?
23:07:45Araqnot really
23:07:56Araqand nimrod's lexer doesn't do it this way
23:07:56*xenagi joined #nimrod
23:09:12filwithmmm... wtf, now `type T = ref object of U` appears to be working in my basic tests...
23:09:19perturbationfor the examples on http://nimrod-lang.org/tut2.html#properties, you can define setters/getters as procs b/c they don't have any objects that inherit from the examples?
23:10:43EXetoCinherit
23:11:18EXetoC?
23:11:31*ehaliewicz quit (Remote host closed the connection)
23:11:59*ehaliewicz joined #nimrod
23:12:24EXetoC"proc p(x: TSomeObj): int = 42" -> echo someObj.p
23:12:35EXetoCor p(someObj). it's your choice
23:12:39perturbationany other types defined as 'object of' the 'TSocket' so no ambiguity
23:12:57perturbation?
23:13:03*nande_ joined #nimrod
23:14:01flaviu1I assume that `object of TSocket` would be downconverted to a TSocket for that method
23:14:02filwitperturbation: "properties" in nimrod are just procs/methods/templates.. it's just referring to languages like C#/D which have special syntax for properties (which allow you do use `T.p` & `T.p = 0` instead of `T.p()` & `T.p(0)`).. in Nimrod, all methods can be called without he parentasees and you have the special syntax "proc `p=`(v:T)" to define setters
23:14:48filwitthe parentheses**
23:14:55EXetoCno conversion needed
23:19:15filwitso, there's a bug with {.inheritable.} it seems.. or at least different behavior
23:20:12filwitwhen i do `type Foo {.inheritable.} = ref object ...` I get the error: "Only final objects can be inheritable"
23:20:45EXetoConly final wut
23:20:48filwithowever, if I do `type Foo = ref object of TObject` (which i was underneath impression was exactly the same as the former) it works.
23:21:32Araqthe error message is clearly wrong
23:21:35filwitthere error is: "inheritance only works with non-final objects"
23:21:37perturbationone sec... let me put a paste bin to try and narrow down where I'm getting confused... you guys are awesome though
23:21:56Araqbut the point is "only *objects* can be inheritable"
23:22:05Araqyou're using it on a 'ref'
23:22:19Araqbut yeah, we can make it work, it's pedantic
23:22:27flaviu1Araq: Since you're still awake, is '\"' just a carryover from pascal?
23:22:29*nande_ quit (Remote host closed the connection)
23:22:37filwitAraq: okay, but it actually works (functions correctly) if i do `type Foo = ref object of TObject` then make a Bar derived of it
23:22:43Araqflaviu1: yes
23:23:09Araqfilwit: .inheritable is really for low level hacks
23:23:42filwitAraq: okay, good to know. So always use 'of TObject' for inheritance then. That's probably my problem with the OOP macros then.
23:23:53Araqquite possible
23:24:02perturbationhttp://pastebin.com/kPCRMzPV
23:25:20*hoverbea_ quit ()
23:25:29Araqgah it's late
23:25:35Araqflaviu1: x <= y implies a <= b if x <= a and y <= b
23:25:42Araqright or wrong?
23:26:42Araqx <= y implies a <= b if a <= x and y <= b
23:27:00Araqthat's the correct rule ... I think
23:27:05flaviu1I know, I have to write it out
23:28:25filwitperturbation: in your example (since you're using procs, not methods) then the procedure which is deduced to be associated with the type (in this case, TSocket since that's what `s` is) is called.
23:29:15*Matthias247 quit (Read error: Connection reset by peer)
23:29:24flaviu1Araq: It looks true, I'll see if I can find a theorem prover to plug it into
23:29:39*darkf joined #nimrod
23:30:21filwitperturbation: if you where to use methods, it would call the procedure appropriate for what the *actual* type is. In this case, it would still be the one for TSocket, because that's what `s` is. But if you had made TSocket a references type (aka, `ref object`) and then made it point to a TSockObj instead of a TSocket, then it would call the method bound to that type instead.
23:31:46filwitperturbation: to be clear, calling a 'method' looks at the reference types type-information and dynamically selects appropriate method to invoke.
23:33:59perturbationokay, I think that makes sense :)
23:34:10perturbationI'll play around with it some more just to get a better feel for it
23:37:12flaviu1Araq: Correct. http://rise4fun.com/Z3/SjGL
23:37:23filwitperturbation: your example might be confusing you since you're not working with reference types (just objects on the stack), which means methods don't come into play (since they only apply to a reference which points to a "higher level" type, aka, a type which is a derived which 'of' the actual type of the reference).
23:37:53flaviu1It seems that asserting false will return unsat, and that returns sat so I think its correct
23:38:08filwitperturbation: sorry, my typos might have made that a bit unclear
23:38:13flaviu1No, nm
23:39:42filwitperturbation: the point is that I could make a `var s: ref TSocket = newTSockObj()`, meaning (to the compiler) the type is `ref TSocket`, however the actual memory it points to is of type `TSockObj`
23:39:45perturbationfilwit: I think I get what you're saying: it's a reference (pointer), so the actual type has to be looked up at run time, just like when you have a sequence which can have either type
23:39:50Araqflaviu1: it's more complex than 4 asserts
23:40:33perturbation(to misquote Arthur Weasley) I just don't trust a programming language unless I can see where it keeps its brain ;)
23:40:47flaviu1Araq: How so? In the first two I'm checking the precondition, then the condition, and then that the implication is true.
23:41:21filwitperturbation: yes exactly. Whenever you have a pointer which points to a type that is actually different from what the compiler sees (which *should* only happen with inherited objects) then you need methods to tell the code to dynamically look up the appropriate method (based on the references type-info)
23:41:58flaviu1For example, if I replace the last assert with `(assert (> a b))`, it fails to prove
23:42:09Araq(assert (<= x a)) # note: swapped x and a here
23:42:11Araq(assert (<= y b))
23:42:12Araq(assert (<= x y))
23:42:14Araq(assert (<= a b))
23:42:22Araqis 'sat' but it's wrong anyway
23:44:02Araqmaybe you need forAll here somewhere
23:44:21Araqbut I'm sure you need "implies" or at least "or"
23:44:32perturbationfilwit: thanks! this makes sense... I'll do some more Project Euler stuff and see if I get tripped up anywhere else working through the tutorials
23:44:56Araqyou have 4 asserts combined with 'and' here, that can never express the original statement
23:45:59filwitperturbation: np, glad i could help. Keep in mind there are also other ways (function pointers) to do similar things without inheritance, and often that makes more sense.
23:46:15filwitperturbation: though I'm sure you already knew that, if you're a C programmer :)
23:53:10Araqgood night