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:30 | flaviu1 | dom96: Sorry, couldn't resist :P |
01:17:33 | Skrylar | hrmm |
01:17:40 | Skrylar | Sublime 3 still isn't out? o_O |
01:19:05 | caioariede | hi 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:35 | caioariede | I think I'm missing something but I can't figure out what I have to do |
01:21:30 | flaviu1 | caioariede: No idea, but try dumping the object using repr |
01:22:08 | flaviu1 | echo(repr(tpl)) will print out the object graph for tpl |
01:24:06 | caioariede | repr entered a infinite recursion loop :o |
01:27:48 | flaviu1 | Yeah, 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:08 | flaviu1 | since 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:21 | caioariede | it's not the case, the error only happens when I pass ctx to another proc |
01:31:43 | caioariede | it works otherwise: https://gist.github.com/caioariede/9986786099eef53e093a#file-gistfile1-nim-L84 |
01:32:12 | * | Jesin joined #nimrod |
01:32:31 | caioariede | it seems to get collected by the gc or something like this |
01:34:30 | flaviu1 | GC sounds reasonable. "TAny keeps a non-traced pointer to its wrapped value and must not live longer than its wrapped value" |
01:36:43 | fowl | well tany is not meant to be passed around like that |
01:38:03 | caioariede | what I could do to keep it alive? |
01:38:22 | flaviu1 | caioariede: What is your end goal? |
01:40:27 | caioariede | I need a key-value dictionary where key is a string and values are TAny, and pass it through procs without losing them |
01:42:54 | fowl | caioariede, 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:53 | fowl | caioariede, if all you need is a small subset of data types i would just use PJsonNode from the json module |
01:45:00 | flaviu1 | I don't know how Araq'd do it, but the way I'd do it as a variant type. |
01:45:23 | flaviu1 | fowl: He also wants to store regular object refrences |
02:12:00 | * | freezerburnv quit (Quit: freezerburnv) |
02:32:56 | fowl | not 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:04 | Demos | Varriount: 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:06 | New-Guy | Howdy fellas. |
05:05:30 | New-Guy | Sorry about all the questions I've had lately. Some of which easily answered. |
05:06:31 | New-Guy | But 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:27 | New-Guy | I 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:49 | New-Guy | Again, I tried looking around and a few different ideas, but couldn't find anything. |
05:07:52 | New-Guy | Thanks in advance. |
05:15:02 | * | Demos quit (Read error: Connection reset by peer) |
05:17:09 | fowl | expr doesnt exist at runtime |
05:23:00 | New-Guy | fowl: And no compile-time only types? |
05:34:09 | fowl | New-Guy, PNimrodNode |
05:35:43 | fowl | New-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:15 | New-Guy | Too simply to warrant a macro. |
05:36:42 | Skrylar | New-Guy: compile-time only types are implicit :P |
05:36:53 | Skrylar | If you only use the type in macros, it gets cut out by dead code elimination AFAIK |
05:37:05 | New-Guy | Yeah, no problem. |
05:38:00 | fowl | New-Guy, its not simple if you're doing anything more than substitution |
05:38:19 | New-Guy | All of the templates making use of the types are one line long. Simply substitution. |
05:41:45 | New-Guy | Like 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:00 | New-Guy | So how are you guys doin'? Don't see much casual chat around here. |
05:47:34 | Skrylar | right now is largely sleeptime |
05:48:20 | New-Guy | Ah, only 2 am over here. |
05:57:29 | fowl | New-Guy, we talk more off topic on #nimrod-offtopic |
05:57:51 | New-Guy | fowl: Ah, I see. That explains it. |
06:06:33 | Skrylar | right now its just me ranting about how google improperly implements imap over there <_< |
06:07:13 | NimBot | Araq/Nimrod devel ee0cbbe Charlie [+0 ±1 -0]: renamed UINT in windows.nim to WINUINT |
06:07:13 | NimBot | Araq/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:26 | Varriount|Mobile | Hi New-Guy |
06:11:48 | Varriount|Mobile | New-Guy: It's true - most of the developers here live in Europe |
06:12:34 | New-Guy | Varriount: Ah, so it's dead in the middle of night for you guys. |
06:15:43 | * | boydgreenfield joined #nimrod |
06:17:15 | Varriount|Mobile | New-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:13 | Varriount|Mobile | I'm just awake because of my weird sleeping habits |
06:19:56 | New-Guy | Varriount: Yeah, East Coast and bad sleeping habits here as well. |
06:32:26 | * | Skrylar headscratches |
06:32:34 | Skrylar | its always weird when its cheaper to buy a new license than buying an upgrade |
06:34:38 | * | bjz joined #nimrod |
06:40:17 | New-Guy | Skylar: What is it? |
06:43:37 | Skrylar | New-Guy: upgrading a mail client |
06:44:38 | Skrylar | i'm one of those weirdos who still uses desktop mail clients |
06:50:56 | Skrylar | sleeeeeeep time. |
06:51:10 | Skrylar | i'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:16 | def-_ | Hi |
09:13:26 | def-_ | 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:32 | dom96 | def-_: I think it should. |
10:05:36 | dom96 | def-_: report it on github |
10:22:40 | * | dLog_ joined #nimrod |
10:24:19 | * | dLog quit (Ping timeout: 240 seconds) |
10:53:49 | Varriount | Good morning dom96 |
11:00:15 | * | freezerburnv quit (Quit: freezerburnv) |
11:00:29 | dom96 | hey |
11:12:32 | * | EXetoC joined #nimrod |
11:31:31 | * | dymk quit (Ping timeout: 240 seconds) |
11:31:47 | * | freezerburnv joined #nimrod |
11:34:02 | EXetoC | so did implicit symbol binding ever become the default? the manual claims that explicit binding is rarely needed now |
11:37:05 | EXetoC | only 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:18 | EXetoC | it'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:11 | EXetoC | explicit binding in the unittest module solves this |
12:13:08 | * | untitaker quit (Ping timeout: 258 seconds) |
12:19:07 | * | untitaker joined #nimrod |
12:34:52 | Araq | def-_: no, this shouldn't work, 'and' is a builtin |
12:35:12 | Araq | and in general a 'procvar' annotation is necessary for this to compile |
12:50:49 | BitPuffin | hey is this getting merged or what? https://github.com/Araq/Nimrod/pull/1228 |
12:51:32 | BitPuffin | Araq: do we want the ability to use cast as a.cast[type] to be consitent with generic procedure invokations? |
12:53:20 | Araq | no we don't want that |
12:53:39 | Araq | BitPuffin: if it makes you happy I'll merge it. Reads like Javadoc though |
12:54:15 | Araq | public Foo(Bar bar) // creates Foo using Bar bar. |
12:55:43 | BitPuffin | Araq: well not all of it, but it's better than nothing :) |
12:56:29 | Araq | I dunno. If you don't want to read, how does MORE text help? |
12:56:36 | BitPuffin | I do want to read |
12:56:57 | BitPuffin | I'm all for being as clear as possible |
12:57:30 | BitPuffin | parMessage is a good example of something that needs clarification |
12:57:43 | Araq | so rename it instead |
12:57:59 | BitPuffin | yeah that'd probably be good |
13:00:02 | BitPuffin | What's a good name.. echoParMsg? |
13:00:37 | Araq | finding good names takes longer than writing it in the first place |
13:00:49 | BitPuffin | yes |
13:00:51 | BitPuffin | agreed |
13:00:54 | BitPuffin | but it's worthwhile |
13:02:07 | BitPuffin | I'd say something like echoParserMessage or printParserMessage but I have a fealing you would think that's too much to type :P |
13:02:43 | Araq | typing is not my major concern, I'm pretty good at typing |
13:02:49 | Araq | I don't want to *read* it |
13:03:08 | Araq | I want the compressed versions of things |
13:03:28 | Araq | so that I can overview much and have a better chance of spotting the bugs |
13:04:30 | Araq | anyway you convinced me |
13:04:38 | BitPuffin | well 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:48 | Araq | and we should have a renamefest |
13:04:52 | Araq | however |
13:04:53 | BitPuffin | I think we should |
13:05:07 | Araq | that means cherrypicking becomes harder |
13:05:14 | BitPuffin | elaborate |
13:05:15 | Araq | and branches will cause many conflicts |
13:05:25 | Araq | I have 2 branches I'm working on |
13:05:41 | Araq | plus we have the master vs devel distinction |
13:05:42 | BitPuffin | well, not if you merge it back into your wip branches |
13:05:51 | BitPuffin | that's usually what I do |
13:06:07 | BitPuffin | to avoid the conflicts |
13:06:18 | BitPuffin | and yes, it will be work, but it is worth it |
13:06:39 | BitPuffin | the result will hopefully be more PRs :) |
13:06:56 | Araq | I agree |
13:07:00 | BitPuffin | Araq: 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:18 | Araq | BitPuffin: that's what I have in mind too :P |
13:07:23 | BitPuffin | okay nice! |
13:07:31 | BitPuffin | I thought you hated subdirectiories :) |
13:07:48 | Araq | I do, but I'm willing to attract fresh blood |
13:07:53 | BitPuffin | haha |
13:08:11 | BitPuffin | well again, they can be painful when you already know what every file is etc |
13:08:20 | BitPuffin | but not for someone trying to grok what is what |
13:08:59 | * | dymk joined #nimrod |
13:09:07 | Araq | well I think nobody uses 'spawn' yet |
13:09:16 | Araq | so I might as well merge my branch into devel |
13:09:50 | BitPuffin | new_spawn? |
13:10:46 | BitPuffin | what's new about it :P |
13:11:43 | BitPuffin | also when are we letting stuff like sempass2 become just sempass |
13:13:17 | Araq | hey, it's the 2nd semantic pass |
13:13:27 | Araq | why should it become sempass ? |
13:13:30 | BitPuffin | oh |
13:13:39 | BitPuffin | I thought it was a "new" semantic pass |
13:13:43 | BitPuffin | to replate the old one |
13:13:44 | BitPuffin | haha |
13:13:46 | BitPuffin | :D |
13:14:07 | BitPuffin | well okay docgen2 then |
13:14:12 | BitPuffin | that's what I think it is isn't it? |
13:14:30 | BitPuffin | yeah by the looks of it it is |
13:17:32 | BitPuffin | while 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:05 | BitPuffin | watch 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:13 | Araq | BitPuffin: new_spawn is a branch which has an improved thread pool and 'spawn' supports return types |
13:32:32 | Araq | the return value is transformed into a promise automatically |
13:33:28 | Araq | furthermore 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:58 | BitPuffin | Araq: awesome |
14:31:14 | BitPuffin | Araq: improved thread pool eh, goodbye go |
14:31:23 | * | bjz quit (Ping timeout: 252 seconds) |
14:33:39 | Jehan_ | Araq: Why rename futures to promises? Unless they're actually promises now? |
14:34:53 | Araq | Jehan_: we already have Future for the async stuf |
14:35:02 | Araq | Promise is for inter thread communication |
14:35:16 | Araq | I'm not happy with the names but thought long about better ones |
14:35:21 | Araq | and didn't find any |
14:35:22 | Jehan_ | Yeah, but it's confusing if it's not what promises are generally understood to be. |
14:35:39 | Araq | well it's not too late |
14:35:46 | Araq | so make a suggestion |
14:35:50 | Jehan_ | Mind you, I'm also not happy with research slang becoming actual programming language vocabulary … :) |
14:36:05 | Jehan_ | Depends on what a promise currently is? |
14:36:22 | Jehan_ | I haven't looked at the code yet, I just scanned through the IRC logs. |
14:36:39 | Araq | it's a ptr with a condition variable and a pointer to the owning thread |
14:36:46 | Araq | you can read from it |
14:37:03 | Araq | this blocks and transfers the value into your heap |
14:37:04 | Jehan_ | Umm. That's the implementation, it doesn't tell me what the semantics are? |
14:37:19 | Jehan_ | So, basically, it is a future? |
14:37:49 | Araq | I don't enough official defintions to tell |
14:37:55 | Araq | but yes, I think so |
14:38:18 | Jehan_ | Hmm. I'll have to have a look at the code, I think. |
14:38:27 | Araq | it's also very close to a dataflow variable |
14:39:41 | Jehan_ | 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:03 | Jehan_ | Task is a term that people can understand fairly easily, unlike future (which is just CS slang). |
14:40:09 | Araq | "task" doesn't convey the right idea |
14:40:27 | Jehan_ | That may be, I'll have to look at the actual code to see what it does precisely. |
14:41:20 | Araq | a task would be some function pointer + data (closure) that you pass to the thread pool and tell it "work on that" |
14:41:46 | Araq | promise is simply a wrapper around the returned result |
14:42:31 | Araq | Delayed[T] would be an alternative name but that's not even a noun |
14:43:13 | Jehan_ | Araq: Okay, any need to expose that part to the user? |
14:43:31 | Jehan_ | I mean, the usual purpose of a future is to have it filled in by some computation. |
14:45:37 | Jehan_ | Wait, is what you have actually a synchronization variable? |
14:46:04 | * | flaviu1 joined #nimrod |
14:47:13 | * | freezerburnv quit (Quit: freezerburnv) |
14:47:31 | Jehan_ | Brb. |
14:48:24 | Araq | Jehan_: yeah but it can only be assigned once and read once |
14:51:25 | BitPuffin | Araq: 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:34 | BitPuffin | TRM maybe? |
14:53:08 | BitPuffin | I hardly think anyone would be happy to type var m: TMatrix[int, TSucc[TSucc[TSucc[TZero]]], TSucc[TSucc[TSucc[TZero]]]] |
14:53:26 | Araq | you can hide it with a macro |
14:53:31 | Araq | but it remains a bad idea |
14:53:52 | BitPuffin | yeah I don't like it |
14:53:59 | BitPuffin | but I think it might not freak out |
14:54:07 | BitPuffin | like static[T]'s atm |
14:55:21 | Jehan_ | 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:34 | Jehan_ | I guess after all, promise may still be the closest approximation to what it actually is. :) |
14:57:02 | Jehan_ | I still don't like the terms "future" and "promise", regardless of their accuracy. |
14:57:12 | Araq | I even thought about naming it Doom[T] ... |
14:57:26 | BitPuffin | lol doom |
14:57:28 | BitPuffin | :D |
14:57:39 | Araq | but programmers have no humor |
14:58:17 | BitPuffin | guess I am no programmer then |
14:58:19 | Araq | (we already have gorge and slurp and nobody likes these names) |
14:58:19 | Jehan_ | Hmm, DeferredValue? Too long? |
14:58:26 | flaviu1 | Araq: Have you seen caioariede's question? Even though he isn't here, I'm curious how you'd implement that |
14:58:42 | Jehan_ | Araq: Well, my only problem with them is that they pollute the main namespace. :) |
15:02:25 | Araq | flaviu1: 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:17 | Araq | Jehan_: I should name it a GoVariable :P |
15:06:30 | OrionPK | araq - how would i invoke a C++ static member function in nimrod |
15:06:31 | Jehan_ | Araq: Heh. :) |
15:06:56 | Araq | OrionPK: simple. wrap it like this: importc: "Foo::bar" |
15:07:00 | Jehan_ | Araq: Or SingleElementNonReusableChannel. :) |
15:07:05 | OrionPK | ahh, beautiful thanks |
15:07:25 | OrionPK | araq what do you think of a library that makes a kind of DSL for defining C++ interfaces |
15:07:44 | OrionPK | as an alternative to pragmas |
15:08:16 | Araq | lets see: C++? check. DSL? check. Interface? check. |
15:08:43 | Araq | --> awesome idea. |
15:08:58 | OrionPK | also for C |
15:09:02 | OrionPK | Im thinking 2 libs |
15:09:16 | Araq | you need more buzzwords |
15:09:34 | OrionPK | lol |
15:10:34 | Araq | Jehan_: using a *channel* for synchronization is already a misnomer |
15:10:46 | Araq | when you think about it |
15:10:49 | Jehan_ | Why? |
15:11:05 | Jehan_ | It has an infinite consensus number, similar to CAS. |
15:11:06 | Araq | well ok, not really a misnomer |
15:11:49 | Araq | but a channel is almost a queue and in my book message passing is inherently asynchronous |
15:12:03 | Araq | maybe I'm weird |
15:12:30 | OrionPK | araq e.g. http://pastebin.com/KvUhHSK8 |
15:12:44 | OrionPK | generates the importcpp/importc's necessary |
15:12:47 | Jehan_ | channels can block on read (and write, if they have finite capacity). |
15:12:50 | Araq | OrionPK: I like it. make it happen |
15:13:10 | OrionPK | araq alrighty, I'll work on it as I have time. I started on it a couple days ago |
15:14:27 | Jehan_ | In fact, unbounded channel functionality is a superset of semamphore functionality. |
15:14:40 | Jehan_ | A semaphore is equivalent to a channel of unit. |
15:15:15 | Araq | a channel with a capacity of 1 is weird, IMHO |
15:15:17 | flaviu1 | Jehan_: Got it. SuperSemamphore? :P |
15:15:47 | Jehan_ | A channel with a capacity of 1 is actually a pretty useful construct for a number of things. :) |
15:16:23 | Jehan_ | flaviu1: sem_post() is equivalent to write(chan, ()), and sem_wait() is equivalent to read(chan). |
15:16:25 | Araq | yes, but it's a weird "channel" |
15:18:29 | Araq | or maybe not ... I conflate channel with queue |
15:19:08 | * | Roin_ quit (Ping timeout: 252 seconds) |
15:22:17 | * | freezerburnv joined #nimrod |
15:26:11 | Jehan_ | A one-element channel can be used to emulate a mutex. :) |
15:26:22 | Jehan_ | write() = lock(), read = unlock(). |
15:26:55 | Jehan_ | Channels are in principle an enormously powerful synchronization mechanism. |
15:27:25 | Jehan_ | Also in general less efficient than more specialized constructs, of course. :) |
15:28:00 | Araq | yeah 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:40 | Jehan_ | It depends on what you're trying to accomplish. |
15:28:47 | * | boydgreenfield joined #nimrod |
15:29:10 | Araq | I'm trying to recall Go's claim |
15:30:05 | Jehan_ | Araq: Go's claim is bogus. |
15:30:16 | Araq | oh really? |
15:30:20 | Araq | now that's news :P |
15:30:38 | Jehan_ | They say that they use channels to ensure that only one thread (well, goroutine) has access to data at any time. |
15:30:50 | Jehan_ | The problem is that their channel implementation doesn't ensure that at all. |
15:31:00 | Jehan_ | Unless they fixed it since I last looked at it. |
15:31:03 | Araq | yeah I'm aware |
15:31:41 | Araq | also they make it very easy to pass closures to goroutines |
15:32:16 | Jehan_ | Well, they assume that they have a shared memory GC, which DOES make such things easy. |
15:32:25 | Araq | heck they encourage it as a goroutine cannot return anything |
15:32:34 | Jehan_ | Of course, it's not easy to write an efficient shared memory GC. |
15:32:45 | Araq | that is not the problem |
15:33:06 | Araq | closures enable innocent looking sharing like nothing else |
15:33:39 | Araq | it's an invitation to data races |
15:34:46 | Jehan_ | You can make that safe. |
15:35:27 | Jehan_ | Data races are in principle trivial to avoid. |
15:35:54 | Jehan_ | 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:10 | Jehan_ | The only tricky part is making this efficient. |
15:36:19 | Jehan_ | Which can be accomplished in a number of ways. |
15:36:37 | Araq | (2) is a huge problem |
15:36:45 | flaviu1 | Jehan_: It can never be more efficient than not having a data race |
15:37:18 | Araq | I get your point |
15:37:26 | Araq | you can easily check for (2) at runtime |
15:37:32 | Araq | but this is overly restrictive |
15:37:33 | Jehan_ | Araq: Yup. |
15:37:44 | Jehan_ | Not so much restrictive as lazy. :) |
15:37:57 | Jehan_ | But even a runtime check beats having a data race. |
15:38:04 | Araq | often I can ensure it's not racy without acquiring that lock |
15:38:16 | Jehan_ | It's not like we statically check array accesses all the time. |
15:38:22 | BitPuffin | OrionPK: make sure that you mention webscale and big data somewhere in the lib |
15:38:33 | Jehan_ | Araq: Yup, a lot of the stuff can be optimized away. |
15:38:45 | Jehan_ | In fact, that's something that I'm working on for my own project. |
15:39:00 | Araq | it's like making me insert assert i < a.len for every a[i] |
15:39:17 | Araq | otherwise a[i] fails at runtime |
15:39:36 | Araq | but hmm |
15:39:53 | Araq | oh I see |
15:40:12 | Araq | you don't do it this way |
15:40:17 | Jehan_ | Incidentally, there are ways to alleviate the problem with closures. |
15:40:29 | Jehan_ | Such as making a copy of the environment. |
15:40:44 | Araq | instead you insert the acquire operation, right? |
15:40:50 | OrionPK | bitpuffin what? I dont see how it's buzzywordy :P |
15:41:02 | Jehan_ | Araq: You mean like Eiffel does? |
15:41:06 | OrionPK | you guys are all talking about promises and futures, thats way more buzzwordy :P |
15:41:33 | Jehan_ | 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:49 | Jehan_ | The trick is to statically guarantee it is often as possible. |
15:42:02 | Jehan_ | Which also necessitates a language design to support that. |
15:42:28 | Araq | copying the closure changes the semantics |
15:43:01 | Jehan_ | Yup. |
15:43:08 | BitPuffin | OrionPK: seriously, big data and webscale not buzzwords? :P |
15:43:13 | Araq | Jehan_: ah so that's what Eiffel does :P |
15:43:21 | BitPuffin | cloud is not a buzzword |
15:43:25 | BitPuffin | BY THAT LOGIC |
15:43:41 | Araq | I barely remember |
15:43:44 | Jehan_ | But only for non-functional languages, and one can argue that this is actually truer to the functional way of doing things. |
15:44:04 | Jehan_ | Didn't C# have to fix its closure semantics recently because of a related problem? |
15:44:22 | Araq | yeah for some meaning of "related" |
15:44:46 | Jehan_ | 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:23 | Araq | Eiffel's Scoop is fundamentally broken |
15:45:33 | Jehan_ | Somewhat simplified, the actual semantics are a bit more involved (especially once you start considering precondition). |
15:45:46 | Jehan_ | Araq: In what way? |
15:46:00 | OrionPK | BitPuffin I just want a less painful way to wrap all those C++ libraries out there ;) |
15:46:03 | Jehan_ | The original spec had holes, but you could mostly infer the intent. |
15:46:13 | OrionPK | that has nothing to do w/ big data / web scale |
15:46:21 | Araq | they map existing stuff to some bizzare concurrenc model and claim it's simple because they ended up requiring few new keywords |
15:46:32 | Jehan_ | I also think it tries being too hard being minimalist. |
15:46:37 | BitPuffin | OrionPK: yeah, we need to make a variant of c2nim that generates output for your lib :) |
15:46:44 | OrionPK | agreed :) |
15:47:02 | OrionPK | once I have a prototype working I'll put it up on github |
15:47:03 | Jehan_ | Ah, yeah. I agree with that. Minus the bizarre part, the underlying concurrency model is mostly straightforward. |
15:47:08 | OrionPK | hopefully we can get some contributions |
15:47:38 | Jehan_ | At the same time, it was about the only language at the time that actually tried avoiding data races. |
15:47:50 | Jehan_ | MInd you, it still is only one of very few that actually does. |
15:48:05 | Araq | Jehan_: yeah, ok, that's a result of their rather poor documentation |
15:48:12 | Jehan_ | Java and C# in particular are little better than assembly language in that regard. |
15:49:13 | Jehan_ | Neither is C++, but then C++ doesn't aspire to be high level. |
15:49:19 | flaviu1 | Wow, UTF8 is pretty nice, you don't even have to care that its utf8, it keeps all the weird stuff above 0x7F |
15:49:33 | Araq | flaviu1: yes. |
15:49:35 | Jehan_ | flaviu1: Yeah. |
15:49:48 | Jehan_ | There were a few articles recently about that, even. |
15:50:26 | Jehan_ | Speaking of which, I'm happy that Nimrod defines a string as basically a sequence of 8-bit characters. |
15:50:52 | Araq | you're quite alone with this opinion |
15:51:05 | flaviu1 | Jehan_: Do you have a link to one of those articles? |
15:51:59 | Jehan_ | 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:09 | Araq | but I'm happy too and I know more about character sets than the people who dislike nimrod's solution |
15:52:23 | Jehan_ | 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:56 | Araq | the unicode standard will be dumbed down eventually |
15:52:57 | Jehan_ | Even if it weren't, weighing down the core datatypes with all the unicode stuff does not convey any benefits. |
15:54:07 | Jehan_ | I'm honestly not sure what the benefits of strictly enforcing a constraint that each string is valid utf8 would be. |
15:54:21 | Jehan_ | Or whatever it is that people want. |
15:54:34 | flaviu1 | Why 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:07 | Araq | flaviu1: the tables are HUGE though and growing |
15:55:47 | Jehan_ | flaviu1: Just implement isUpper(), for example. That's actually pretty simple. |
15:55:47 | Araq | at the same time many human languages are moribund |
15:55:56 | flaviu1 | The computer doesn't care, the code generation can deal with it. |
15:56:07 | Jehan_ | Or try to benchmark StartsWith() in C#. |
15:56:25 | flaviu1 | Jehan_: Implementing toUpper() might be a good learning experience. |
15:56:27 | flaviu1 | Not arguing against strings being byte sequences, I like that. |
15:56:58 | Jehan_ | Don't get me wrong, comprehensive Unicode support is a good thing to have. |
15:57:21 | Araq | toUpper itself is a flawed concept... |
15:57:34 | Jehan_ | Araq: Yup. See ß and friends. :) |
15:57:58 | Jehan_ | Which is why I specifically said isUpper(). :) |
15:58:31 | Araq | ah |
15:59:22 | Jehan_ | I actually had that discussion with a Google interviewer once. |
16:02:47 | flaviu1 | I'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:41 | Araq | flaviu1: 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:37 | Jehan_ | flaviu1: I think \l is what you need instead. |
16:04:52 | flaviu1 | I know, still a bit odd |
16:04:52 | Araq | no you should really use "\n" |
16:05:26 | Jehan_ | Araq: can't use \n in a character literal. |
16:05:43 | Araq | Jehan_: yes. that means he shouldn't use a character literal. |
16:05:49 | Araq | but a string literal |
16:06:09 | Jehan_ | Depends on the application. |
16:06:16 | flaviu1 | Araq: Well, I need to use a char literal, so I'm using a '\l' |
16:06:35 | Jehan_ | For parsing strings character by character, it'll have to be '\l'. |
16:07:15 | flaviu1 | ^ Exactly my usecase |
16:09:55 | Araq | no |
16:10:06 | Araq | for parsing strings you need to do something like: |
16:10:29 | Araq | if s[i] == '\C': inc i; if s[i] == '\L': inc(lineNumber); inc i |
16:12:05 | Jehan_ | What's the difference between \L and \l? |
16:14:37 | flaviu1 | Case insensitive I think |
16:26:05 | Skrylar | Araq: 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:24 | Araq | Skrylar: hmmm nimrod uses that too for its exception handling |
16:40:32 | * | shodan45 joined #nimrod |
16:40:42 | Araq | maybe we can make it compatible |
16:41:30 | Araq | but no, I don't want it in the stdlib, I already have those :P |
16:43:33 | * | Matthias247 joined #nimrod |
16:46:57 | Skrylar | i 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:38 | Araq | Skrylar: well they are not public |
17:47:32 | * | hoverbea_ joined #nimrod |
17:50:51 | * | hoverbear quit (Ping timeout: 252 seconds) |
17:54:24 | BitPuffin | Alright I will do what nobody else has done |
17:56:14 | BitPuffin | that we've needed for a while |
17:58:55 | * | Joe_knock joined #nimrod |
17:58:58 | Joe_knock | Hello |
17:59:34 | BitPuffin | hey Joe_knock |
17:59:37 | BitPuffin | welcome if you are new |
18:00:05 | Joe_knock | Hello BitPuffin, thank you. Yes I am. I've come to Nimrod via Python |
18:01:13 | * | Demos joined #nimrod |
18:05:31 | Araq | hi Joe_knock welcome |
18:06:07 | * | Demos quit (Ping timeout: 245 seconds) |
18:06:31 | BitPuffin | I shall update the htmlgen and dom modules |
18:06:41 | BitPuffin | and possibly write a css module |
18:06:58 | Joe_knock | Araq: Thank you |
18:07:16 | Joe_knock | What is/are the current primary use-cases of nimrod? |
18:07:55 | BitPuffin | Joe_knock: it's general purpose |
18:08:58 | Joe_knock | BitPuffin: Can I find some type of list that demonstrates where nimrod is being used in production? |
18:08:59 | BitPuffin | you could write an operating system, a web browser, a web application, a game, a photo editor, AI, etc |
18:09:07 | BitPuffin | anything :) |
18:09:21 | BitPuffin | I dunno, is there a list currently? |
18:10:49 | dom96 | http://forum.nimrod-lang.org is a good example |
18:10:55 | Joe_knock | I'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:04 | BitPuffin | dom96: no it's not because it looks like a ballsack :P |
18:11:15 | BitPuffin | and is terribly insecure |
18:11:18 | BitPuffin | but either way |
18:11:24 | dom96 | BitPuffin: Hey, I designed it :( |
18:11:32 | BitPuffin | dom96: hugs? |
18:11:52 | dom96 | BitPuffin: Nope. Never gonna forgive you for that </3 |
18:11:58 | BitPuffin | dom96: your blog looks good though, did you design that? |
18:12:05 | dom96 | BitPuffin: Yes! |
18:12:11 | BitPuffin | dom96: so you got better :) |
18:12:30 | Araq | it's more secure than most commercial software that I've seen, but that means nothing :-) |
18:12:31 | dom96 | But nah I kid. I agree the forum design looks meh. |
18:12:46 | dom96 | But I wanted to get it up and running quickly |
18:12:49 | BitPuffin | Araq: yeah sure :P |
18:12:53 | BitPuffin | I can imagine |
18:12:54 | Joe_knock | Is Araq Andreas? |
18:12:57 | BitPuffin | yes he is |
18:13:06 | Araq | it used to look cool but it didn't age well ... |
18:13:08 | BitPuffin | dom96: yeah it's obviously rushed :) |
18:13:29 | Araq | there are designs which keep looking good and then there are other designs |
18:13:41 | dom96 | It's a practical design :P |
18:13:45 | BitPuffin | I can't imagine the forum ever looking good lol |
18:13:49 | dom96 | It serves its purpose |
18:14:10 | Joe_knock | To 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:25 | dom96 | See ^ :D |
18:14:25 | BitPuffin | well alright it's not the most shitty looking thing in the world |
18:14:31 | BitPuffin | some things are ok-ish |
18:14:33 | BitPuffin | :P |
18:14:39 | dom96 | Time to add more <blink>!!! |
18:14:45 | BitPuffin | dom96: he said IF it's user friendly :P |
18:15:21 | Araq | Joe_knock: I'm afraid there is no list of users who use it in production and this list is very small anyway |
18:15:21 | dom96 | I'll make it so that it only uses blink tags for your IP |
18:15:33 | Araq | *this list would be |
18:15:35 | dom96 | It'll still be user friendly, but it'll also be BitPuffin unfriendly :D |
18:15:40 | Joe_knock | what is the status of concurrency with regards to nimrod? Are you guys building that in like the Go and Rust folk? |
18:15:50 | BitPuffin | dom96: it doesn't even have search :P |
18:16:19 | dom96 | BitPuffin: Google. |
18:16:22 | Jehan_ | BitPuffin: That's what Google is for. :) |
18:16:54 | Araq | Joe_knock: yes. it pushes the state of art. (Jehan_: feel free to disagree vehemently) |
18:16:55 | Jehan_ | 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:00 | BitPuffin | that is literally the most pathetic reply I've gotten twice in a long time |
18:17:07 | Jehan_ | Araq: Heh. :) |
18:17:14 | BitPuffin | and why does it tell me how fast it generated the page |
18:17:29 | BitPuffin | Jehan_: kind of a difficult thing to get wrong though |
18:17:32 | Jehan_ | 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:40 | dom96 | BitPuffin: why not? Reddit does too |
18:17:43 | BitPuffin | <textarea></textarea> done |
18:18:07 | BitPuffin | dom96: the forum isn't reddit, and reddit doing it is stupid as well |
18:18:17 | BitPuffin | YAGNI principle dom96, YAGNI |
18:18:18 | dom96 | BitPuffin: Don't diss reddit bro |
18:18:32 | BitPuffin | reddit sucks dick |
18:18:34 | BitPuffin | :P |
18:18:47 | Joe_knock | Well 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:48 | BitPuffin | all software and websites suck today okay |
18:19:05 | BitPuffin | Joe_knock: yeah that's the advantage of our community indeed |
18:19:28 | BitPuffin | Although Araq can be a grumpy cat at times, however, with good reason |
18:19:38 | dom96 | Jehan_: Do you think Araq's promises should be merged with my async futures? |
18:20:03 | Jehan_ | I honestly haven't looked at the async stuff yet, so I can't tell. |
18:20:22 | dom96 | IMO users will find the subtle differences between the two confusing. |
18:20:33 | BitPuffin | true |
18:20:36 | Araq | the difference is hardly subtle |
18:20:43 | Araq | they are completely different things |
18:20:45 | Jehan_ | 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:53 | BitPuffin | dom96: did you publish the article yet btw? |
18:21:05 | BitPuffin | Jehan_: nimrod should be more than fine for that |
18:21:07 | Jehan_ | So, sockets etc. are not a priority for me at the moment. |
18:21:13 | Araq | the only confusing thing is that C++ uses the same terms and does it differently |
18:21:14 | BitPuffin | they exist though |
18:21:19 | Jehan_ | BitPuffin: It is. That's why I'm using it. |
18:21:19 | BitPuffin | when you'll need those |
18:21:23 | BitPuffin | oh wait |
18:21:27 | BitPuffin | thought you were Joe |
18:21:29 | BitPuffin | haha |
18:21:31 | BitPuffin | :P |
18:21:43 | Joe_knock | aah crap, no tutorials for Jester either. Perhaps I should tinker and write a few. |
18:21:48 | BitPuffin | Araq: that is no good, we have to think of our own buzzwordy name |
18:22:11 | Araq | so make a suggestion. We all failed to come up with something better |
18:22:16 | Jehan_ | 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:17 | dom96 | BitPuffin: Araq has put an embargo on it :P |
18:22:37 | BitPuffin | Araq: hyperdimensional vow |
18:23:09 | dom96 | Joe_knock: That would be awesome :) |
18:23:12 | BitPuffin | or maybe just vow |
18:23:15 | BitPuffin | lol |
18:23:17 | BitPuffin | :P |
18:23:18 | Joe_knock | Jehan_: You're obviously using Nimrod to process something equivalent to massive hordes of data? |
18:23:36 | Jehan_ | Joe_knock: No, actually small amounts of data. |
18:23:43 | BitPuffin | Jehan_: well that's why I said I thought you were Joe |
18:23:44 | Joe_knock | oh shit, dom96 is the author of Jester haha |
18:23:48 | Jehan_ | Mostly tooling for a project. |
18:23:49 | BitPuffin | athorwise I wouldn't be selling it to you |
18:23:58 | dom96 | Joe_knock: indeed :D |
18:24:10 | BitPuffin | Araq: pledge |
18:24:12 | Joe_knock | What are the benefits that nimrod brings? Jehan_ |
18:24:36 | Jehan_ | Joe_knock: More productive than doing it in C++. |
18:24:38 | BitPuffin | anticipate |
18:25:13 | Jehan_ | Joe_knock: I need a statically typed, imperative, garbage-collected language where I'm not drowning in boilerplate. |
18:25:26 | Jehan_ | There aren't a whole lot of options in this area. |
18:25:26 | BitPuffin | Araq: prospect? |
18:25:31 | * | boydgreenfield quit (Quit: boydgreenfield) |
18:25:51 | Joe_knock | As long as it serves you well, Jehan_ |
18:25:56 | BitPuffin | Araq: prognose? |
18:26:04 | BitPuffin | l :p |
18:26:17 | Araq | BitPuffin: 'plegde' is too positive; 'promise' has the benefit of implying "yeah ... right" |
18:26:18 | flaviu1 | Does nimrod really have opportunities for boilerplate except for C bindings? |
18:26:35 | Joe_knock | Could an application that manages electronic flying devices be considered "soft real-time" ? |
18:26:59 | BitPuffin | Araq: what about vow then, that's short even |
18:27:04 | BitPuffin | so you should like it |
18:27:18 | Jehan_ | flaviu1: I want to *avoid* boilerplate. |
18:27:19 | flaviu1 | Joe_knock: If the electronic flying device doesn't get any commands for 200ms, will it crash? |
18:27:44 | flaviu1 | Jehan_: I know, but I'm curious if there are any cases where you can't avoid it |
18:28:08 | BitPuffin | Joe_knock: what kind of flying device do you mean |
18:28:09 | Jehan_ | flaviu1: It depends on your definition of boilerplate. |
18:28:12 | Joe_knock | flaviu1: Based on a flight height of at least 100 meters, no. Perhaps only take-off and landing will be the issue. |
18:28:35 | BitPuffin | Joe_knock: in the worst case you can also skip using a GC |
18:28:36 | Joe_knock | BitPuffin: Like an RC helicopter |
18:28:56 | flaviu1 | soft 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:59 | BitPuffin | that way you can even get the memory usage down if that's a scarce resource |
18:28:59 | Jehan_ | flaviu1: I'm thinking of stuff like http://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming) |
18:29:36 | Araq | Joe_knock: depends on your spec entirely. ask me in a few months again, then I can tell you more. |
18:30:00 | Joe_knock | flaviu1: So soft real-time is a provision, it isn't a constraint of nimrod? |
18:30:27 | Araq | would I personally use Nimrod for *hard* realtime systems? yes, but then I know what I do ;-) |
18:30:27 | BitPuffin | Araq: homework? XD |
18:30:49 | BitPuffin | "The Nimrod Homeworks" |
18:31:08 | BitPuffin | goal maybe |
18:31:19 | Joe_knock | I take it you guys are not yet experiencing oss politics. |
18:31:31 | BitPuffin | Joe_knock: hmm? |
18:31:55 | Joe_knock | BitPuffin: Eg. People disagreeing on every decision |
18:32:17 | BitPuffin | Joe_knock: we all disagree at times, but Araq is our almighty dictator so he always has the final say |
18:32:22 | flaviu1 | Joe_knock: We have quite a bit of bikesheding, but we also have a dictator |
18:32:49 | Joe_knock | http://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:54 | Jehan_ | Until Guido runs him over with a bus or however that goes. :) |
18:33:23 | * | def- joined #nimrod |
18:33:41 | Joe_knock | Aah the great Guido. |
18:33:41 | flaviu1 | Joe_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:08 | flaviu1 | Also, 200ms is quite a large overestimate, according to the docs it can do as low as 2ms pause times |
18:34:37 | Joe_knock | flaviu1: 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:38 | Jehan_ | flaviu1: There is a bit more explanation necessary. |
18:35:17 | * | nande_ quit (Read error: Connection reset by peer) |
18:35:44 | BitPuffin | Joe_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:28 | Araq | --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:03 | BitPuffin | plus 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:05 | BitPuffin | :P |
18:37:42 | BitPuffin | I guess it depends on what sort of data you get back |
18:37:53 | BitPuffin | I'm not too familiar with coding for those |
18:38:16 | Jehan_ | Araq: What would you say about Pending[T] instead of Promise[T]? |
18:38:26 | BitPuffin | that's a pretty good word |
18:38:27 | Joe_knock | Using the sensor data to re-calibrate the helicopter position would be important. |
18:38:37 | Joe_knock | But let me not get ahead of myself there :P |
18:38:54 | flaviu1 | I didn't know that --gc:none warns, awesome |
18:38:56 | BitPuffin | Joe_knock: yeah but I mean when you poll from the sensor, do you always get the same amount of data? |
18:39:07 | Araq | flaviu1: that's new with 0.9.4 |
18:40:26 | Joe_knock | Yes, 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:08 | BitPuffin | Joe_knock: yeah, so you could just use the stack then, no GC needed |
18:41:28 | Araq | Joe_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:15 | Joe_knock | thanks for the feedback guys. |
18:42:29 | Araq | ping Varriount |
18:42:31 | flaviu1 | Does RTTI still work with the GC off? |
18:42:49 | Araq | flaviu1: yes |
18:44:09 | * | boydgreenfield joined #nimrod |
18:45:11 | BitPuffin | Araq: should I just go crazy with the existing htmlgen module or should I make a html5gen module instead |
18:45:40 | Araq | the htmlgen module is widely used. don't touch it. |
18:45:56 | * | BitPuffin didn't think anyone uses it |
18:46:04 | BitPuffin | okay so html5gen it is |
18:46:32 | Araq | okay. I'll kill you if you use immediate templates/macros. |
18:46:45 | Araq | they caused lots of problems |
18:46:48 | BitPuffin | that's a bit harsch |
18:47:02 | Araq | fits your character |
18:47:03 | Jehan_ | Heh. :) |
18:47:20 | BitPuffin | the only thing I'm doing is updating it to support all the html5 tags :P |
18:47:22 | flaviu1 | Whats wrong with macros? |
18:47:34 | BitPuffin | Araq: I'll use generics of course |
18:47:41 | Jehan_ | Immediate macros, he said, and I was wondering the same thing. |
18:47:41 | BitPuffin | and do fancy stuff |
18:48:41 | BitPuffin | fits my character to die o.O? |
18:48:41 | * | boydgreenfield quit (Ping timeout: 255 seconds) |
18:49:09 | BitPuffin | I 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:06 | Araq | nothing but *immediate* macros don't participate in overload resolution and exporting immediate macros like 'a', 'p' is asking for trouble |
18:50:22 | BitPuffin | ahahahaha |
18:50:26 | BitPuffin | I bet |
18:50:58 | BitPuffin | but what about using immediate macros to define the tags? |
18:50:59 | Jehan_ | Yeah, I remember running into problems with trying to define an immediate template with varargs. |
18:51:37 | Araq | BitPuffin: never ever export an immediate symbol. what you do locally doesn't matter |
18:51:46 | flaviu1 | BitPuffin: I've done stupider stuff with macros than dom96 has :P |
18:52:16 | BitPuffin | Araq: well why is everything in htmlgen module an immediate macro then XD |
18:52:17 | Joe_knock | "I'll kill you if you use immediate templates/macros." :O |
18:52:29 | Jehan_ | Speaking of which, is it worth requesting an alternative syntax to "from foo import nil"? |
18:52:32 | BitPuffin | Joe_knock: see what I mean about grumpy cat? :) |
18:52:37 | Jehan_ | Or is that set in stone? |
18:52:40 | Joe_knock | lol |
18:52:51 | BitPuffin | Joe_knock: I hope he doesn't talk like that to his kids |
18:52:52 | Araq | Jehan_: what's wrong with it? |
18:53:28 | Joe_knock | from ... import is pythonic |
18:53:43 | Joe_knock | "from ... import ..." |
18:53:57 | Jehan_ | 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:43 | Araq | so use your own privateImport macro :P |
18:54:45 | flaviu1 | Jehan_: Some whitespace doesn't hurt anything |
18:55:07 | Jehan_ | Araq: Yeah, that's where I ran into problems with variadic templates. |
18:55:17 | Jehan_ | Which is why I remembered and mentioned it. |
18:55:20 | Araq | interesting |
18:55:35 | Jehan_ | Basically, immediate templates can't have varargs parameters. |
18:55:45 | Araq | yep |
18:56:00 | Jehan_ | And if I don't make them immediate, the compiler tries to resolve the module names. |
18:56:07 | Araq | you can use a macro though |
18:56:31 | Jehan_ | Okay. I may, if I feel strongly enough about it again at one point. |
18:56:52 | Jehan_ | I decided to resolve the situation back then with just copying and pasting the import statement. |
18:57:12 | BitPuffin | Araq: I think what I'll do is to create an immediate macro that creates exported templates or something |
18:57:28 | Araq | the compiler doesn't try to resolve module names anymore for 'expr' but the situation is ... hardly ideal |
18:57:47 | Jehan_ | Heh. |
18:57:50 | flaviu1 | Jehan_: The best solution may be to just put up with it. Macros for non-standard syntax is |
18:57:54 | flaviu1 | 't very good |
18:57:59 | * | boydgreenfield joined #nimrod |
18:58:01 | Joe_knock | Jehan_: 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:12 | Jehan_ | Well, it's hardly the most urgent problem in the world. |
18:58:57 | Joe_knock | Jehan_: 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:02 | Jehan_ | Joe_knock: My concern was more with the readability of the code, less with having to type it. |
18:59:17 | Jehan_ | Joe_knock: I was talking about "from foo import nil". |
18:59:43 | Jehan_ | Which is sort of the same as "import qualified foo" in Haskell. |
18:59:51 | dom96 | BitPuffin: write a new htmlgen module using the syntax Araq showed in his emerging langs talk |
18:59:52 | Joe_knock | What change would you propose? Jehan_ |
19:00:23 | Jehan_ | Note the "nil", which makes it different from: "from foo import x, y, z" |
19:00:39 | Jehan_ | My complaint was about not being able to do "from foo, bar import nil". |
19:01:13 | Joe_knock | I see now. Okay that is a different situation |
19:01:26 | Araq | BitPuffin: 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:22 | Jehan_ | 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:12 | Araq | BitPuffin: I had to lookup "vow". can't be right for programming |
19:04:03 | Araq | and I'm afraid nobody except Jehan_ knows the definition of "promise" anyway :P |
19:04:32 | Jehan_ | Araq: Yeah. As I said, I'm not a big fan of using CS slang. |
19:04:47 | Jehan_ | Araq: The biggest offender in my mind is the type "unit". |
19:05:01 | Jehan_ | Which makes a lot of sense if you're familiar with type theory, but totally confuses everybody else. |
19:05:22 | Araq | heh. |
19:07:09 | wan | How about "PinkieSwear"? |
19:07:47 | Araq | the biggest offender is C++'s "vector" for a flexible array |
19:07:56 | fowl | speaking of macro bugs |
19:08:05 | fowl | i made the vm crash yesterday |
19:08:09 | Araq | vectors in math are usually of a fixed size |
19:08:23 | Araq | fowl: so report it please |
19:08:32 | fowl | reporting issues is so 2013 |
19:08:44 | fowl | i'll report it on twitter and reddit |
19:08:46 | Araq | yeah, report it on the forum instead |
19:09:33 | Araq | but start the post with "argh I forgot my password so I had to re-register" |
19:10:32 | fowl | lol |
19:10:48 | Jehan_ | Araq: vector isn't CS slang, though, it's just a misnomer. |
19:10:52 | flaviu1 | Araq: Shouldn't nimrod's arrays be called vectors then? :O |
19:11:34 | Jehan_ | 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:12 | Jehan_ | As to fixed size, umm, take K[[x]] as a vector space. :) |
19:12:50 | Jehan_ | Or, well, just K[x]. |
19:13:26 | Joe_knock | I remember vectors, that would be linear algebra |
19:14:22 | * | flaviu1 quit (Remote host closed the connection) |
19:14:44 | fowl | sweet |
19:14:47 | fowl | i got issue #1234 |
19:16:07 | * | flaviu1 joined #nimrod |
19:17:56 | Araq | fowl: you're the typical programmer :P using every single feature that nimrod offers. :-) |
19:21:09 | * | brson quit (Ping timeout: 252 seconds) |
19:35:30 | flaviu1 | Any thoughts on syntax like `doSomething(_ + 1)` for lambdas? |
19:35:39 | * | onibaka joined #nimrod |
19:35:56 | Araq | hi onibaka welcome |
19:36:13 | Araq | flaviu1: we already have enough syntax for lambdas |
19:36:33 | Araq | more sugar is the point of the upcoming => macro |
19:37:28 | flaviu1 | I know, but I don't see how `_ + 1` could be implemented without compiler support |
19:39:17 | Araq | you can always put it into a string literal, but yeah you're right |
19:39:24 | Araq | that's currently not possible |
19:49:05 | * | boydgreenfield quit (Quit: boydgreenfield) |
19:56:16 | Jehan_ | flaviu1: If you want short inline expressions, the sequtils.nim approach may be an alternative. |
19:56:26 | flaviu1 | hmm, 'got (proc (GenericParam): auto), expected proc (char): bool{.closure.}' |
19:57:03 | flaviu1 | Jehan_: Thanks, that might work |
19:57:36 | BitPuffin | reactormonk: how do I install your nimrod-mode? |
19:57:42 | Jehan_ | The only problem I see with the sequtils.nim approach is that the variable naming needs to be consistent. |
19:59:25 | flaviu1 | Jehan_: If I do that, I'd probably do a macro such that `fn: _ + _` works |
19:59:40 | flaviu1 | But I wonder how underscores will behave |
19:59:56 | Araq | the compiler rejects single underscores |
19:59:58 | Jehan_ | Well, _ is not a valid identifier. |
20:00:02 | flaviu1 | maybe using alphabet letters |
20:00:36 | Jehan_ | That's why you may just as well use something like "it" for a single argument. |
20:01:00 | Jehan_ | It's not really different from using "self" or "this" in single dispatch OO languages. |
20:01:28 | flaviu1 | Jehan_: But in some cases I might have multiple variables, like a fold |
20:01:31 | Jehan_ | A convention for multiple arguments would be nice. |
20:01:38 | Jehan_ | Yeah, I was getting to that. :) |
20:01:49 | BitPuffin | Araq: it would be awesome if you could create your own customized effect tracikng |
20:02:08 | flaviu1 | so I'd probably do a, b, c, ... |
20:02:12 | Jehan_ | val1, …, valn or arg1, … argn are obvious candidates, but a bit verbose. |
20:02:18 | Araq | BitPuffin: you mean override the inference rules to something unsound? :P |
20:03:16 | Jehan_ | Hmm, doesn't Groovy use "it" too to allow you to elide a single argument parameter list? |
20:03:17 | BitPuffin | Araq: 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:17 | BitPuffin | Araq: 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:08 | Araq | there is a point in life where bug prevention ends up taking much more time than fixing bugs |
20:05:20 | BitPuffin | well this is for optimization |
20:05:40 | BitPuffin | without having to have more types |
20:05:42 | flaviu1 | Araq: 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:43 | BitPuffin | Araq: I guess it doesn't have to be an effect, but a compiletime-only variable associated with a type |
20:07:57 | Araq | flaviu1: that's what the D guys try to do |
20:08:26 | Araq | "you must not overload 'in' when it takes O(N) time" |
20:09:25 | flaviu1 | That's a bit insane, my version would be nothing more than statically checked verification. |
20:09:39 | Araq | that's not our way. Often I know N is small and O(N) is meaningless. |
20:09:50 | flaviu1 | s/verification/documentation/ |
20:09:50 | BitPuffin | I wonder if something like that can be created with macros |
20:10:24 | flaviu1 | BitPuffin: Yes, but it'd be easier if I had a way to apply a pragma to all procs |
20:10:57 | BitPuffin | flaviu1: are you talking about your thing or my thing |
20:10:57 | flaviu1 | If a hole appears, it becomes useless |
20:11:00 | Araq | flaviu1: you can do that with .push iirc |
20:11:23 | flaviu1 | BitPuffin: My thing |
20:11:24 | flaviu1 | Araq: Neat, I'll look into it later |
20:11:52 | Araq | flaviu1: there is a much easier way to do it though |
20:12:17 | flaviu1 | hmm? |
20:12:18 | Araq | use the effect system to prevent recursions |
20:12:26 | Araq | it's a planned feature |
20:12:45 | Araq | gives you something different but workable |
20:13:23 | Araq | you only need to check nested for loops then to estimate the O and carefully inspect every 'while' loop |
20:14:18 | fowl | how can i importc a generic type in the cpp gen |
20:15:25 | Araq | fowl: you can't |
20:15:27 | flaviu1 | fowl: http://en.wikipedia.org/wiki/Name_mangling#Standardised_name_mangling_in_C.2B.2B |
20:15:39 | BitPuffin | Araq: so do you think compiletime only properties to types is possible to implement with macros? |
20:16:12 | Araq | BitPuffin: we already have these, might be a bit buggy for now though. Check out the manual |
20:16:36 | BitPuffin | oh |
20:17:04 | BitPuffin | what are they called? |
20:17:37 | Araq | generics with default values |
20:17:48 | Araq | or something like that |
20:18:28 | fowl | BitPuffin, link me when u find it plz |
20:19:08 | Araq | type Foo[T; S = 3] = Bar[T] |
20:19:09 | BitPuffin | I'm lookin |
20:19:20 | BitPuffin | Araq: and those are mutable? |
20:19:47 | Araq | no, what does that mean? |
20:20:51 | BitPuffin | type TMatrix[T; R, C: static[int]; O = false] = ... |
20:22:49 | BitPuffin | proc orthogonalized[T, R, C, O](m: TMatrix[T, R, C, O]): TMatrix[T, R, C, true] |
20:22:55 | BitPuffin | well |
20:22:58 | BitPuffin | guess it doesn't really matter |
20:23:13 | BitPuffin | sinec I don't mutate |
20:24:24 | fowl | Araq, 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:24 | BitPuffin | Araq: 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:49 | BitPuffin | fowl: did you go hg? :D |
20:25:02 | fowl | no |
20:25:11 | fowl | i dont know hg any more than i know git |
20:25:30 | flaviu1 | BitPuffin: Main usecase for bitbucket is the free private repos |
20:25:37 | BitPuffin | flaviu1: I know |
20:29:17 | Araq | fowl: ok ... that doesn't mean it's a good idea though ;-) |
20:29:35 | BitPuffin | can't seem to find it in the manual |
20:29:40 | BitPuffin | are 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:04 | fowl | Araq, what do you mean? its nice to have for debugging info |
20:51:36 | * | filwit joined #nimrod |
20:52:20 | BitPuffin | o/ filwit |
20:52:44 | filwit | hey folks, is there a reason deriving a ref type from another causes an error? bug? or something else? |
20:52:50 | filwit | heya BitPuffin |
20:53:12 | filwit | type Foo {.inheritable.} = object ... |
20:53:20 | filwit | type Bar = ref object of Foo ... |
20:54:04 | filwit | # causes segfault or sometimes some odd behavior |
20:55:34 | filwit | woah, damn. 324 issues... i remember when there was just two pages.. |
20:56:44 | BitPuffin | filwit: how's the website coming along? |
20:57:23 | filwit | good, i meant to have everything done last weekend, but got caught up doing other things |
20:58:03 | * | eigenlicht joined #nimrod |
20:59:11 | filwit | i'm shooting for this weekend. HTML/CSS is mostly done, just working on exporting some of the graphics still |
21:00:43 | filwit | i'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:09 | BitPuffin | cool! |
21:02:25 | * | onibaka quit (Quit: onibaka) |
21:03:03 | filwit | yeah, 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:42 | BitPuffin | hehe |
21:04:46 | * | seubert joined #nimrod |
21:04:46 | * | oddmunds joined #nimrod |
21:06:32 | filwit | My 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:37 | filwit | right 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:45 | filwit | stupid internet... |
21:28:08 | filwit | was talking for a few minutes to no-one apparently :\ |
21:28:56 | filwit | $90/month and the thing still drops at least 6 times a week on average |
21:30:06 | * | freezerburnv joined #nimrod |
21:30:28 | filwit | anyways, is Araq still around, or has he hit the hay already? |
21:32:11 | * | onibaka joined #nimrod |
21:32:22 | Araq | hi filwit |
21:32:31 | BitPuffin | filwit: ah cool, I wonder if there is a way to get the multi textures in there |
21:33:01 | filwit | oh, great, hi Araq |
21:33:01 | EXetoC | filwit: 1gb/1gb is it? :p |
21:33:01 | dom96 | yo filwit |
21:33:05 | filwit | damn, everyone at once :D hi all |
21:33:13 | EXetoC | *gbit |
21:33:45 | filwit | Araq: is my earlier question a bug or expected behavior? (can't make 'ref object' derived of another object) |
21:34:42 | BitPuffin | afaik ref object should be no problem |
21:34:49 | BitPuffin | but what do I know really, I mean REALLY |
21:35:52 | filwit | BitPuffin: 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:21 | Araq | filwit: my guess is that your problem is something else |
21:36:21 | filwit | Araq: no, i did a very simple test (Foo/Bar level stuff) and it caused a segfault |
21:36:38 | filwit | Araq: but it did also behave a bit differently when i made my OOP macros export the code |
21:36:53 | filwit | Araq: so i'm not entirely sure. Are you saying it should work? |
21:37:08 | filwit | Araq: if so, i'll do more tests, and report any bugs i find. |
21:37:19 | Araq | it's worth reporting either way |
21:37:34 | BitPuffin | filwit: well if it is just collada then shouldn't you try and get it upstream with blender= |
21:37:36 | BitPuffin | ? |
21:37:44 | Araq | tbh I'm not sure what ref + .inheritable means :P |
21:37:55 | Araq | why not inherit from TObject? |
21:38:19 | filwit | because my OOP macros don't spit out a TObject.. they just spit out a `type T = ref object` |
21:38:33 | BitPuffin | like real men |
21:38:48 | filwit | so i'm extending to spit out `type T = ref object of U`, but it fails |
21:39:37 | filwit | yes 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:05 | filwit | EXetoC: sorry, i didn't understand your question from earlier |
21:41:21 | filwit | EXetoC: oh, where you talking about internet speed? |
21:42:30 | filwit | EXetoC: idk, mines like 60Mbps (or however you say) but the router sux ass |
21:43:11 | BitPuffin | :) |
21:43:12 | EXetoC | really expensive |
21:43:35 | filwit | EXetoC: it's Brighthouse networks (some south east company) but it's my only option here (not even Verizon FiOS yet) |
21:44:07 | filwit | yeah, i hear internet in other places is cheaper, but gotta live with what's available i guess |
21:44:49 | filwit | it'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:16 | filwit | BitPuffin: 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:26 | flaviu1 | filwit: Can you make a git repo for your kate configurations? |
21:46:56 | flaviu1 | I 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:08 | BitPuffin | filwit: ideally you want a binary format |
21:47:55 | filwit | flaviu1: awesome, I've already uploaded to here: https://gist.github.com/PhilipWitte/11196561 |
21:48:26 | filwit | flaviu1: 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:57 | flaviu1 | That's a gist though, I can't send a PR. I can set up a repo for it if you'd like. |
21:49:12 | filwit | BitPuffin: 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:23 | filwit | flaviu1: ah, i see |
21:49:31 | BitPuffin | filwit: yeah, much easier to start with |
21:49:36 | BitPuffin | filwit: and to write dummy data for |
21:49:44 | filwit | flaviu1: okay i will make a official git repo for it tonight |
21:50:00 | flaviu1 | Thanks |
21:50:34 | flaviu1 | I've been reading about sqlite, they claim it works as a file format. Have you considered that? |
21:50:47 | filwit | no |
21:50:52 | filwit | don't know anything about it |
21:51:18 | filwit | BitPuffin: i'm considering making an JSON version (already started) over XML anyways, just cause i prefer the format |
21:51:31 | BitPuffin | filwit: yeah |
21:51:47 | BitPuffin | filwit:I wonder if yaml is fitting for that type of data |
21:52:01 | filwit | plus, it would be easy to make a JSON -> BSON converter for binary formats |
21:52:23 | filwit | if Nimrod doesn't already have something like that, it would be helpful for more than just my project |
21:52:36 | Araq | I'd use sqlite |
21:52:40 | Skrylar | i talked about a 'pandoc for data' thing a while back |
21:52:42 | BitPuffin | I wouldn't |
21:52:54 | filwit | i guess i'll have to look into sqlite |
21:52:57 | Araq | BitPuffin: why not? |
21:53:13 | BitPuffin | Araq: well I guess it depends on the kind of game |
21:53:31 | BitPuffin | Araq: But I don't really think storing stuff like vertex data in a relational database is a good idea |
21:53:32 | flaviu1 | I haven't done much with SQL, but it seems like fun to program in |
21:53:56 | Araq | BitPuffin: if the alternative is XML ... |
21:54:09 | BitPuffin | Araq: however perhaps things like level structure etc could be fitting |
21:54:26 | BitPuffin | you could do something where the metadata is in sqlite and the actual data is in binary files |
21:54:35 | BitPuffin | that would probably work quite well |
21:54:35 | flaviu1 | BitPuffin: Why not store vertexes in sqlite? |
21:54:39 | Araq | a component model is already close to a relational model |
21:55:00 | Araq | and most games are heading for a component model |
21:55:03 | filwit | flaviu1, 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:16 | BitPuffin | flaviu1: why not store music samples in sqlite |
21:55:27 | * | freezerburnv quit (Quit: freezerburnv) |
21:55:32 | BitPuffin | flaviu1: why not store pixel data in sqlite |
21:55:33 | Roin | did somebody just compare an SQL database with MS Excel? |
21:55:36 | flaviu1 | BitPuffin: Ok, so store the vertex structure as a binary blob. |
21:55:37 | Roin | geez... |
21:55:42 | BitPuffin | flaviu1: yeah |
21:55:54 | Araq | hi Roin. glad you're still around |
21:55:59 | Roin | Heya Araq o/ |
21:56:03 | Araq | what happened to underscore? |
21:56:10 | Roin | oh he sits right next to me atm |
21:56:20 | BitPuffin | Like 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:22 | Roin | Still studying unlike me lol |
21:56:24 | filwit | Roin: yes i did.. probably shows my ignorance :P |
21:57:16 | Roin | filwit: 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:33 | Roin | database management system actually duh hoh |
21:57:42 | filwit | the problem with storing Bitmaps, Sounds, etc in a SQL table (compared to the filesystem) is that it sux for content creators |
21:57:44 | Roin | Araq: I havent coded anything in ages, feel like I should do it again |
21:57:51 | Roin | so my brain doesnt dry out |
21:58:12 | Araq | filwit: yeah, don't do that |
21:58:20 | Roin | Araq: 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:33 | Roin | filwit: databases are not meant to store such data |
21:58:35 | BitPuffin | I also don't know if I would use sqlite during the actual simulation etc |
21:58:51 | BitPuffin | I would probably store the base level metadata in sqlite, and then load it all into memory |
21:58:59 | Roin | You 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:13 | BitPuffin | doing a bunch of mutations in sql probably wouldn't be very fast :) |
21:59:41 | flaviu1 | It 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:53 | filwit | well 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:23 | Roin | streaming data sounds more like you want a high performance file system |
22:00:33 | filwit | but 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:47 | filwit | Roin, yeah i agree |
22:01:03 | BitPuffin | Roin: well we weren't talking about streaming data :) at least I wasn't :o |
22:01:11 | flaviu1 | How would sql negatively impact modablity? |
22:01:42 | filwit | flaviu1: because it forces you to use an external tool to access/modify the data, rather than just the filesystem |
22:01:59 | BitPuffin | filwit: well you have to use a text editor to modify an xml file |
22:02:04 | flaviu1 | You can't use notepad, sure. But sqlite has a nice repl |
22:02:06 | Roin | BitPuffin: 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:16 | BitPuffin | and you are gonna have a more difficult time finding the relevant stuff |
22:02:20 | Araq | flaviu1: it requires modders to know about SQL. And they don't. |
22:03:02 | BitPuffin | Roin: ah. No I was just thinking more like serializing your metadata for levels and game objects to an sqlite file |
22:03:11 | BitPuffin | and then load it all to memory |
22:03:11 | flaviu1 | Araq: The modders that can't learn the very basics of SQL are the ones that won't be releasing any worthwhile mods |
22:03:36 | Araq | flaviu1: I use this argument myself, but in this case it is really wrong :P |
22:03:39 | Roin | BitPuffin: 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:47 | filwit | BitPuffin, 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:15 | BitPuffin | Roin: yeah I'd use my own binary format but I was trying to explain how Araq's suggestion is somewhat valid |
22:04:24 | Roin | oh ok |
22:04:25 | flaviu1 | filwit: Fair enough, non-blob data is much better for sqlite |
22:04:48 | BitPuffin | filwit: well that's why I say don't store vertex/image/sound data in sqlite |
22:04:51 | Roin | since I didnt see the initial statement I'm totally with you anyway, just trying to throw in my 50 cent ;P |
22:04:52 | BitPuffin | that's fucking dumb :D |
22:05:07 | BitPuffin | Roin: :) |
22:05:16 | filwit | BitPuffin: then what *would* i be storing in sqlite? |
22:05:31 | flaviu1 | I would still store things like level data or gameplay state in sqlite, if only because I haven't really used it before |
22:05:48 | BitPuffin | filwit: for the fourth time, metadata, level structure (this object has this material, this parent, these components etc) |
22:05:58 | filwit | sure i guess |
22:06:05 | BitPuffin | :D |
22:06:07 | flaviu1 | At least its better than creating a new blob format and dealing with that |
22:06:16 | filwit | though I'm happy with just JSON/BSON for that |
22:06:25 | BitPuffin | I think your own blob format is worth it in the end |
22:06:27 | filwit | cause one is human readable, and the other is optimized |
22:06:32 | BitPuffin | but sqlite is probably a good thing to start with |
22:06:34 | Roin | filwit: basically relational data... which results in text, numbers and so on that arent too big :P |
22:06:36 | BitPuffin | if you don't want to deal with that |
22:07:13 | flaviu1 | filwit: You could implement json or bson exporting from sqlite |
22:07:30 | flaviu1 | You could also use something like protobuf or capt'n crunch |
22:07:30 | Roin | hm in Python this was relatively easy |
22:07:47 | Roin | like 5 lines to get data from sqlite, turn it into a datastructure that you could dump to json |
22:07:57 | filwit | flaviu1: 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:27 | flaviu1 | You get to use the SQL language to manipulate the data |
22:08:32 | BitPuffin | getting a repl |
22:08:35 | Roin | in sqlite tables you can haz structure and relations and stuff, json does not know relations |
22:09:19 | BitPuffin | yeah |
22:09:24 | Skrylar | json/bson have heirarchial relations and flexible schemas |
22:09:27 | BitPuffin | the way you'd do it is to put in an id or something |
22:09:36 | Skrylar | SQL has fixed schemas and relationships are a little more indirect |
22:09:37 | filwit | meh, 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:38 | BitPuffin | which is more expensive to verify the integrity of |
22:10:22 | Roin | and you can haz indexes and other nice things |
22:10:24 | filwit | i'm just liking JSON/BSON approach, so i'll stick with if for now |
22:10:37 | filwit | but i'll look into sqlite and stuff later, just to be sure |
22:12:05 | * | onibaka quit (Quit: onibaka) |
22:12:08 | filwit | Araq: you mentioned that my Monokai colors where too colorful for your tastes last time I showed you. What colors *do* you like? |
22:12:32 | filwit | Araq: i've added VS 2013 light and dark colors, and the dark is now my favorite. You like those? |
22:13:01 | flaviu1 | The VS colors are very nice |
22:13:55 | filwit | yeah, the light one is pretty good, but the dark one is just perfect IMO |
22:14:42 | filwit | i 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:42 | Araq | filwit: I need to see a screenshot to be able to tell |
22:15:53 | * | boydgreenfield quit (Ping timeout: 255 seconds) |
22:16:27 | filwit | one sec |
22:16:27 | flaviu1 | Araq: 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:30 | Roin | Hm I thought you were talking about a game lol |
22:17:41 | Roin | already wondered what VS stood for |
22:17:49 | Araq | what's the topic again? colors for the new documentation? |
22:18:13 | filwit | http://www.reign-studios.net/philipwitte/nimrod/kate/Syntax_VSDark.png |
22:18:31 | flaviu1 | Araq: Kate color scheme |
22:19:12 | flaviu1 | filwit: What KDE theme are you using? |
22:19:20 | filwit | Araq: :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:42 | filwit | flaviu1: it's a modified Elementary Flat theme |
22:19:57 | Araq | filwit: it's much better yeah. but I still prefer my own scheme |
22:20:44 | flaviu1 | Araq: I'm looking for color schemes, mind sharing? |
22:22:16 | * | boydgreenfield joined #nimrod |
22:24:25 | Araq | flaviu1: no time for screenshots sorry, it's the "darknim" scheme in aporia |
22:25:08 | flaviu1 | Thanks |
22:26:38 | filwit | holy crap that's a horrible color scheme, lol |
22:27:17 | filwit | i now know that we will forever be at odds in terms of colors if this is your preference, haha |
22:27:29 | flaviu1 | I like colorful color schemes |
22:28:28 | filwit | i like colors which indicate types and stuff, like distinguishing varname/typename/property/function-call/etc |
22:29:03 | flaviu1 | I wonder if there's some way to get Kate to use the compiler for highlighting information |
22:29:16 | filwit | but beyond just being completely uniform, that color scheme is way to "stark white on pitch black" |
22:30:04 | filwit | flaviu1: 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:42 | flaviu1 | I 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:28 | filwit | why not do it in Nimrod, then simply make a C++ wrapper where needed |
22:31:46 | filwit | well.. i supposed that might not be possible if you need to start up the GC |
22:32:21 | filwit | then again, they're doing it for Python, so it should be a similar challenge |
22:32:53 | flaviu1 | Because nimrod and C++ don't have several modules I'd need, and I don't want to end up shaving yaks. |
22:33:24 | filwit | shaving 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:16 | flaviu1 | I'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:03 | perturbation | hi all... i'm working my way through the tutorials |
22:48:07 | perturbation | and I kind of have a dumb question |
22:48:23 | filwit | hello. shoot |
22:48:31 | perturbation | how do I know when to use methods (dynamic binding) vs proc's (static binding) |
22:48:50 | dom96 | That is not a dumb question at all |
22:48:53 | perturbation | it seems like I could make overloaded procs and it should be able to look up which to use by object type |
22:49:16 | EXetoC | not at runtime |
22:49:18 | filwit | when you want to invoke a overload from a "base object" reference |
22:49:29 | EXetoC | (polymorphism) |
22:49:38 | Skrylar | filwit: 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:56 | filwit | Skrylar: yeah, i looked it up and was pretty much what i was expecting |
22:50:23 | filwit | perturbation: let me make a simple gist for you real quick, to explain things. one sec |
22:50:25 | flaviu1 | Its origin story is still interesting |
22:50:46 | perturbation | thanks filwit, EXetoC |
22:51:02 | flaviu1 | I 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:31 | dom96 | we should write a "by example" tutorial |
22:54:13 | flaviu1 | Yeah, by example is much faster and easier |
22:55:07 | flaviu1 | GitBook is really nice |
22:56:47 | filwit | perturbation: https://gist.github.com/PhilipWitte/81f92d2da57d42109b43 |
22:57:10 | filwit | perturbation: let me test that real quick, just to make sure i'm not lying to you :P |
22:57:46 | perturbation | heh, no worries... really conceptually I just need to wrap my head around it conceptually |
22:58:48 | filwit | hmmm... well it doesn't work, one sec let me fix it before you study it.. |
22:59:44 | Araq | good night |
23:00:00 | filwit | later |
23:00:20 | filwit | perturbation: okay, fixed it. now it compiles and works right |
23:00:33 | perturbation | thanks filwit |
23:00:46 | filwit | np. |
23:01:21 | Araq | perturbation: simple. never use inheritance and then you never need 'method' |
23:01:59 | perturbation | well I confess I am coming at this from a stone-age C perspective |
23:02:11 | perturbation | so structs are all I need really :D |
23:02:41 | filwit | perturbation: 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:52 | EXetoC | makes sense. you just need the features that C has :p |
23:03:02 | flaviu1 | perturbation: If you only use them as structs, you'll never need to use the method keyword |
23:03:41 | perturbation | filwit: ohhhhh. Because I can make it either, *that*'s why it can't know which is which at compile time |
23:04:38 | filwit | perturbation: 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:27 | Araq | well there are alternatives filwit |
23:05:46 | filwit | perturbation: 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:01 | filwit | Araq: yes, i know about procvars |
23:06:11 | filwit | Araq: i'm just explaining methods |
23:06:19 | Araq | yeah sure |
23:06:50 | flaviu1 | Araq: The only way to process the `adfs"rawstring"` sugar is with a indefinite lookahead, right? |
23:07:45 | Araq | not really |
23:07:56 | Araq | and nimrod's lexer doesn't do it this way |
23:07:56 | * | xenagi joined #nimrod |
23:09:12 | filwit | hmmm... wtf, now `type T = ref object of U` appears to be working in my basic tests... |
23:09:19 | perturbation | for 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:43 | EXetoC | inherit |
23:11:18 | EXetoC | ? |
23:11:31 | * | ehaliewicz quit (Remote host closed the connection) |
23:11:59 | * | ehaliewicz joined #nimrod |
23:12:24 | EXetoC | "proc p(x: TSomeObj): int = 42" -> echo someObj.p |
23:12:35 | EXetoC | or p(someObj). it's your choice |
23:12:39 | perturbation | any other types defined as 'object of' the 'TSocket' so no ambiguity |
23:12:57 | perturbation | ? |
23:13:03 | * | nande_ joined #nimrod |
23:14:01 | flaviu1 | I assume that `object of TSocket` would be downconverted to a TSocket for that method |
23:14:02 | filwit | perturbation: "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:48 | filwit | the parentheses** |
23:14:55 | EXetoC | no conversion needed |
23:19:15 | filwit | so, there's a bug with {.inheritable.} it seems.. or at least different behavior |
23:20:12 | filwit | when i do `type Foo {.inheritable.} = ref object ...` I get the error: "Only final objects can be inheritable" |
23:20:45 | EXetoC | only final wut |
23:20:48 | filwit | however, 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:32 | Araq | the error message is clearly wrong |
23:21:35 | filwit | there error is: "inheritance only works with non-final objects" |
23:21:37 | perturbation | one sec... let me put a paste bin to try and narrow down where I'm getting confused... you guys are awesome though |
23:21:56 | Araq | but the point is "only *objects* can be inheritable" |
23:22:05 | Araq | you're using it on a 'ref' |
23:22:19 | Araq | but yeah, we can make it work, it's pedantic |
23:22:27 | flaviu1 | Araq: Since you're still awake, is '\"' just a carryover from pascal? |
23:22:29 | * | nande_ quit (Remote host closed the connection) |
23:22:37 | filwit | Araq: 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:43 | Araq | flaviu1: yes |
23:23:09 | Araq | filwit: .inheritable is really for low level hacks |
23:23:42 | filwit | Araq: okay, good to know. So always use 'of TObject' for inheritance then. That's probably my problem with the OOP macros then. |
23:23:53 | Araq | quite possible |
23:24:02 | perturbation | http://pastebin.com/kPCRMzPV |
23:25:20 | * | hoverbea_ quit () |
23:25:29 | Araq | gah it's late |
23:25:35 | Araq | flaviu1: x <= y implies a <= b if x <= a and y <= b |
23:25:42 | Araq | right or wrong? |
23:26:42 | Araq | x <= y implies a <= b if a <= x and y <= b |
23:27:00 | Araq | that's the correct rule ... I think |
23:27:05 | flaviu1 | I know, I have to write it out |
23:28:25 | filwit | perturbation: 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:24 | flaviu1 | Araq: 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:21 | filwit | perturbation: 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:46 | filwit | perturbation: to be clear, calling a 'method' looks at the reference types type-information and dynamically selects appropriate method to invoke. |
23:33:59 | perturbation | okay, I think that makes sense :) |
23:34:10 | perturbation | I'll play around with it some more just to get a better feel for it |
23:37:12 | flaviu1 | Araq: Correct. http://rise4fun.com/Z3/SjGL |
23:37:23 | filwit | perturbation: 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:53 | flaviu1 | It seems that asserting false will return unsat, and that returns sat so I think its correct |
23:38:08 | filwit | perturbation: sorry, my typos might have made that a bit unclear |
23:38:13 | flaviu1 | No, nm |
23:39:42 | filwit | perturbation: 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:45 | perturbation | filwit: 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:50 | Araq | flaviu1: it's more complex than 4 asserts |
23:40:33 | perturbation | (to misquote Arthur Weasley) I just don't trust a programming language unless I can see where it keeps its brain ;) |
23:40:47 | flaviu1 | Araq: How so? In the first two I'm checking the precondition, then the condition, and then that the implication is true. |
23:41:21 | filwit | perturbation: 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:58 | flaviu1 | For example, if I replace the last assert with `(assert (> a b))`, it fails to prove |
23:42:09 | Araq | (assert (<= x a)) # note: swapped x and a here |
23:42:11 | Araq | (assert (<= y b)) |
23:42:12 | Araq | (assert (<= x y)) |
23:42:14 | Araq | (assert (<= a b)) |
23:42:22 | Araq | is 'sat' but it's wrong anyway |
23:44:02 | Araq | maybe you need forAll here somewhere |
23:44:21 | Araq | but I'm sure you need "implies" or at least "or" |
23:44:32 | perturbation | filwit: 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:56 | Araq | you have 4 asserts combined with 'and' here, that can never express the original statement |
23:45:59 | filwit | perturbation: 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:15 | filwit | perturbation: though I'm sure you already knew that, if you're a C programmer :) |
23:53:10 | Araq | good night |