<< 20-03-2014 >>

00:01:18BitPuffinAraq: don't
00:08:32*Matthias247 quit (Quit: Matthias247)
00:09:19fowljust fix all the issues and call it 1.0 :p
00:09:36fowlby all the issues i mean the most important ones (mine)
00:13:41Araqbut but but
00:13:57Araqall the cool features are still missing
00:36:49*DAddYE quit (Ping timeout: 240 seconds)
00:37:17BitPuffinAraq: you probably want the extra headroom of 0.9.6 and 0.9.8 first
00:37:33BitPuffinif not you could jut go from 0.9.6 to 1.0
00:37:39Araqtrue lol
00:37:56BitPuffinso better do it then than doing it now and be sorry later :P
00:40:24fowlthis should pass right:
00:41:01fowltype tc = generic Z; Z of TObject type X = object of TObject; x is tc
00:44:04BitPuffinfowl: no
00:44:16BitPuffinbecause it's not allegro
00:44:29BitPuffinwell I*m not even sure I*ll do the LD at all
00:51:36BitPuffinI wanna get rid of this damn ordinal type expected bug :(
00:54:01Araqgood night
00:54:03OrionPKwasnt someone working on a filesystem watcher thing for n imrod
00:54:24*EXetoC quit (Quit: WeeChat 0.4.3)
00:54:37OrionPKah,,, http://nimrod-lang.org/fsmonitor.html
00:54:41OrionPKonly for linux
01:05:12BitPuffinOrionPK: well I was wishing to make a file system with nimrod lol
01:05:14BitPuffinbut too much work
01:05:17BitPuffinbut you know
01:05:20reactormonkOrionPK, should work on windows too, you can also try a few of the ruby tools and see what bindings they use
01:05:21BitPuffingot infinite time :P
01:05:52*holly_ joined #nimrod
01:08:50*q66 quit (Quit: Leaving)
01:12:20holly_can anyone help, when i compile latest with useffi i get an error in vm.nim when it passes a seq[TFullReg] to callForeignFunction in evalffi.nim, which expects a TNodeSeq
01:13:00fowlholly_, useffi is broken atm, its a known issue
01:15:40fowlholly_, ffi isnt used to interface with c btw, its for the VM
01:16:28*holly_ quit (Ping timeout: 245 seconds)
01:50:00fowlBitPuffin, ugly: AL_FUNC(bool, al_resize_display, (ALLEGRO_DISPLAY *display, int width, int height));
01:56:51Demosis there a way to say, apply whatever explicit conversions you need to make this compile?, I have a literal '1' that I want to convert to like "T.T" but I can not just go and name T.T due to a compiler bug
01:59:29OrionPKreactormonk it wont work on windows
01:59:36OrionPKlook at the fsmonitor doc
01:59:51OrionPK## Windows support is not yet implemented.
01:59:58OrionPKhttps://github.com/Araq/Nimrod/blob/devel/lib/pure/fsmonitor.nim
02:01:21DemosI am 100% in support of implicit conversions being applied to literals
02:37:33fowlDemos, what type? some distinct type?
02:37:46Demosany type
02:37:51Demosor wait
02:38:01fowlthis works: var x: GLint = 4
02:38:03Demosjust like an integer literal to a float32 in this case
02:38:22fowl:float32=4 works
02:42:57*xenagi quit (Quit: Leaving)
02:43:31*wolfspaw joined #nimrod
02:43:38*wolfspaw left #nimrod (#nimrod)
02:44:01fowlDemos, what context is it not working in
02:45:12Demosa[i,i] = 1 where `[]=`(self: var TMatrix; i,j: int; val: TMatrix.T)
02:45:42*DAddYE joined #nimrod
02:45:59DemosHOLY SHIT
02:47:01fowl?
02:48:05DemosI was having an issue where my 2x2 matrices were being "converted" to 4x1 matrices when I used []= on them, but when I stop importing unittest the problem goes away
02:49:53Demoswait never mind
02:58:49Demoshttps://github.com/Araq/Nimrod/issues/1018 that was annoying to track down :D
02:58:52DemosI thought I was seeing things
03:05:56Demosis there a way to tell nimrod not to reuse generics?
03:08:55*BitPuffin quit (Ping timeout: 264 seconds)
03:12:20fowlDemos, in your example is "Tmat2f is tvec4f" true?
03:13:19Demosyes it is
03:13:43fowlwell
03:13:51fowl2*2-1 == 4*1-1
03:14:37fowli think that is your issue
03:14:39Demosright, but the size of the array has nothing to do with the type
03:14:49Demosif it does then it is totally insane semantics
03:15:08Demosit prevents phantom types from ever being useful
03:15:41Demosand if I just stick another phantom on the end it works
03:16:13Demosor actually it still crashes but TVec4f is TMat2f returns false
03:16:47Demosbut if I change the phantom to P: static[int] `is` returns false
03:16:53fowlits trying to access index 4 in an array of size 4
03:16:53Demoserm true
03:16:57DemosI know
03:17:05Demosbut it should be trying to access index 2
03:17:23Demosexcept TMatrix.N returns the wrong number
03:17:56DemosI have a thing of type TMatrix[2,2,float32]. Saying TMatrix.N in `[]=` should in no reasonable universe return 4
03:17:58fowli dont get how TMatrix.N is supposed to be the TMatrix "self"
03:18:12Demosthat is the syntax
03:19:12Demoshttp://build.nimrod-lang.org/docs/manual.html#generics
03:20:43fowlso it specifically refers to the first parameter?
03:21:31Demosno, any param of type TMatrix, if you have multiple implicit generic params with different types you need to do like type(self).T or whatever
03:21:59Demosresult = exprStructuralEquivalent(a.n, b.n) and sameFlags(a, b) for tyStatic params
03:22:28fowlbtw when you do an issue put ```nimrod so its highlighted right
03:23:28Demossorry
03:23:45Demosthere
03:24:20fowli see what ur talking about tho (sry im slow tonight)
03:25:17Demosno problem
03:26:56fowli ran into a problem when i used pos = tuple[x,y: float] and velocity = tuple[x,y: float] as components because velocity was matching for pos but indeed your types should be different
03:58:31Demoshmm it gets to typeRel in sigmatch.nim and the generic params seem to be compared as tyInt, where the comparison is just a.kind == b.kind
03:58:36Demosnothing with values at all
04:27:48*DAddYE quit (Remote host closed the connection)
04:28:15*DAddYE joined #nimrod
04:28:46Demoshm opengl.nim seems unaware of frameworks
04:31:56SkrylarI get the impression OpenGL.nim is quite bad :>
04:32:52*DAddYE quit (Ping timeout: 265 seconds)
04:51:27Demosnot so bad, I just made a PR to fix it a bit
04:51:37Demosit does the job
05:11:12reactormonkOrionPK, sad
05:25:02SkrylarI wonder when decentralized DNS is going to become a thing
05:25:17Skrylarsomething built off DHT maybe?
05:26:18reactormonkSkrylar, sounds interesting
05:27:04SkrylarI just came across this http://online.wsj.com/news/articles/SB10001424052702303563304579447362610955656?mod=trending_now_3 which goes on about how apparently ICANN is getting dropped as a US asset and Russia wants to take it over (.. and disallow certain people to make domains)
05:27:21SkrylarWondering if the netizens will interpret that as damage and route around it :)
05:28:48*DAddYE joined #nimrod
05:33:46*DAddYE quit (Ping timeout: 265 seconds)
05:37:56Demoswow trying to figure out quaternions at 2AM is probably not a great idea
06:12:49*brson quit (Ping timeout: 240 seconds)
06:15:09*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
06:18:42*Skrylar quit (Ping timeout: 264 seconds)
06:21:13*DAddYE joined #nimrod
06:23:44*Demos joined #nimrod
07:06:29*Demos quit (Ping timeout: 240 seconds)
07:29:18*nande quit (Read error: Connection reset by peer)
08:25:46*DAddYE quit (Remote host closed the connection)
08:26:53*fowl quit (Quit: Derogatory terms for gynecomastia can include moobs (for male boobs) and bitch tits.[34])
08:30:11*fowl joined #nimrod
09:31:56*q66 joined #nimrod
10:13:26*BitPuffin joined #nimrod
10:21:35BitPuffinfowl: err, is that even in the API? or is it in the source
10:21:42BitPuffinbecause I don't see it
10:22:34BitPuffinah I see
10:22:42BitPuffinit's how they create the functions
10:23:32BitPuffinfowl: I don't think that counts as ugly API since you never call AL_FUNC, so your point is invalid
10:27:24BitPuffinfowl: does make it impossible for c2nim to do it automatically
10:27:33BitPuffinso it becomes a by-hand sort of deal
10:32:56BitPuffinand they probably have a good reason for doing so, it's not like they are like "Hey, I don't know how to put a function is a C header, so I need to create my own macro for doing that!!!"
10:43:06BitPuffinfowl: yep, like I thought, it's to deal with compiler specific ways to declare library procs
10:43:56BitPuffinhttps://gist.github.com/BitPuffin/9661175
10:44:02BitPuffinthat should make it clear
11:00:31*CARAM joined #nimrod
11:11:00BitPuffinfowl: anyways if you don't wanna wrap it I might do it myself instead, even if I might skip the jam. It's just dandy
11:12:40*EXetoC joined #nimrod
11:49:18*jennings joined #nimrod
11:49:36*jennings left #nimrod (#nimrod)
11:50:17*b_jennings joined #nimrod
11:52:08Araqhi b_jennings welcome
11:52:44Araqzahary, zahary_ I wonder if tyStatic is a mistake
11:53:00BitPuffinwhy?
11:53:14Araqwe're using the type system for a constraint that has nothing to do with the type
11:53:29Araqquite like C's "volatile"
11:54:11Araqis the following true? static[int] is int
11:55:02Araqdoes static[int] match static[int] better than int in overloading resolution?
11:56:13Araqis static[static[int]] the same as static[int]? (yes.)
11:57:05BitPuffinhmm
11:57:06BitPuffingood point
11:57:14BitPuffinmaybe it should be some kind of compile time effect thingy
11:57:21EXetoCisn't this a type vs value thing?
11:57:49Araqis typedesc[static[int]] the same as static[typedesc[int]]? (no.)
11:58:09Araqbut typedesc[int] is the same as static[typedesc[int]]
11:59:23Araqbtw 3's type is int(iteral(3)) not static[int(literal(3)]
12:01:20EXetoCI suppose you could resolve it somehow, but would it make sense?
12:09:27EXetoCapparently you can specify only the major version when qualifying libs on linux, so it doesn't seem so bad anymore
12:09:52Araqwell let's see what zahary thinks about it
12:10:17AraqI think it should be another AST contraint instead
12:12:49zahary_"static[int] is int" should be true; int is not static[int] on the other hand; typedesc[static[int]] is not even close to static[typedesc[int]]; I personally think that int(literal(3)) should go as it is just a single purpose construct
12:16:08zahary_tyStatic is very much like tyVar, when it comes to overload resolution (the "more specific" overload matching should affect both in a good way)
12:17:12zahary_I'm not particularly happy with AST constraints attached to node kinds, because they don't let you do things like the semistatic[T] type or the new predicated statics that I used in the latest swizzle commit
12:22:40*renesac quit (Quit: Leaving)
12:26:35Araqsemistatic[T] is a workaround for a missing .specialize pragma/macro afaict
12:28:43BitPuffinEXetoC: I'm pretty sure I'm gonna use allegro for the 3d stuff too actually haha. Just because it's nice to not have to deal with a million different libfontformat, libcontainerformat, libaudiocodec, libimageformat, libsoundoutput, libcreateopenglcontext etc
12:30:23Araqzahary_: so now we have to skipTypes(foo, {tyStatic}) everywhere because most of the time nobody cares about static[T] vs T
12:30:26zahary_that would be another kludgy single-purpose solution (it will produce more confusing "non of the overload matches" messages and it will require special single-purpose API to carry out the isStatic check in the body).
12:31:15zahary_and we are discussion just overload resolution here. attaching AST contraints to the parameters leaves you completely in the cold in semtypinst and generateInstances
12:31:50Araqstatic means a different thing for generic parameters
12:32:33zahary_well, as I said, tyStatic is very similar to tyVar - both have to be skipped in a lot of places
12:33:00EXetoCBitPuffin: ok
12:33:33BitPuffinEXetoC: and ofter the 3d rendering pass is done I can use the 2d stuff in allegro for rendering UI :P
12:34:14Araqwell you can add tyStatic to types.abstractInst et al and hope for the best
12:34:20zahary_the skip categories should help with that
12:34:36Araqor you can through the whole compiler and check every single skipTypes call
12:34:45Araqand decide what it needs to do with tyStatic
12:36:11zahary_do we have bugs likes this at the moment? I have already fought such problems
12:37:26AraqI don't know
12:37:40EXetoCBitPuffin: your API won't be any good for UI's?
12:37:58BitPuffinEXetoC: my API will yes
12:38:03BitPuffinbut this is not for making my API
12:38:16Araqit just feels like you're fighting bug after bug when it comes to 'tyStatic' and so I wonder whether it's flawed by design :P
12:38:19BitPuffinI want a bit more experience before I start designing the API
12:38:26BitPuffinlike for example having made a physics engine etc
12:39:31AraqI mean just write it down: "semistatic[T] is a type that causes specialization for an instantiation if the passed expression is a constant value or otherwise it simply means T"
12:39:48zahary_the hardest part so far is to get the interaction between tyStatic and tyRange used as array index
12:40:25zahary_since people want to be able to say array[5, int] ,where 5 got computed in some weird way from a static type
12:40:41Araq"and so semistatic[int] introduces an implicit generic as otherwise there would be no instantiation context to begin with"
12:41:23Araqthat's not a type, that's a side-effect in the compilation pipeline masked as a type ...
12:43:04zahary_I don't see how replacing semistatic[T] in that sequence with any other type class like tuple|object is different
12:45:05zahary_*in that sentence*
12:45:44zahary_I also plan other similar types like fwd[T] = var T | T btw
12:46:21zahary_proc foo(x: fwd[MyType]): fwdas(x, int) = x.value
12:47:13zahary_again, just to show how var T and static[T] are so similar
12:52:33Araqwell 'var T' is another kludge but apart from that
12:53:14Araqobject|tuple means "any object or tuple here", semistatic[int] means "int as a type, but potentially static"
12:53:23*zielmicha quit (Quit: Connection closed for inactivity)
12:53:38Araqwhich describes exactly the same set of values as 'int'
12:53:54Araqthe difference is quite big, in my opinion
12:54:09Araqtypes are primilariy to specify the set of valid values
12:54:49zahary_I understand your point, but and/or types also serve the purpose of a "ordered choice" construct
12:55:01zahary_not just type set semantics
12:56:01zahary_I find this property useful - obviously it has practical value here, because "potentially static" means that you can exploit that information in the body of the proc
12:56:54Araqwhat's another use case apart from specialization?
12:57:27zahary_well, the forward type I posted is another example
12:57:55zahary_RandomAccessibleIterator | Iterator is used in C++
12:59:21AraqI'm still talking about static/semistatic not about |
12:59:35Araq| is a very clear type construction
13:01:21Araqin fact, I think whenever somebody uses the type system to not directly refer to the 'valid set of values' interpretation the trouble begins
13:01:22zahary_for hypolang I wanted to have this hidden duality to turn some ifs into when statements
13:01:51AraqC++ const, volatile come to mind
13:01:58Araqor D's immutable
13:02:17Araqimmutability is not a property of a type, it's an orthogonal concept
13:03:39Araqit's modelled as C[T] where it should be MetaInformation[C, T] instead
13:05:41zahary_did you get my remark about turning ifs into whens or does it need more explaining?
13:06:01AraqI think I got it
13:06:08zahary_if MetaInfromation[C, T] is something that you propagate in the program in a metaInformation field, how is that different than a type?
13:07:29Araqwell I propose to use MetaInformation instead of the 'typ' field for nodes indeed
13:07:46Araqand in that sense it's not different
13:07:58zahary_in my thinking, I appreaciate that we are introducing types that are not entered by the user, but rather computed from the definition (i.e. write tracking determines that a type is immutable or lent, etc)
13:08:13zahary_but still, this is type information in my book
13:08:21Araqbut it models *orthogonality* properly
13:08:38Araqand so I can do if n.meta.typ.kind == tyInt
13:08:49Araqwhithout bothering about skiptypes
13:10:40Araqmuch like we use (T, F) for the effect system and not F[T]
13:11:30Araqbut I gotta go, see you later
13:13:16zahary_well, I'm interested in tacking one of your to-do list items (make implicitStatic the default) - my plans involve some similar reforms, but this will come later and we need tyStatic now
13:13:26BitPuffinhmm
13:13:30BitPuffinwhen I export what I import
13:13:36BitPuffindo I still have to specify full path?
13:13:50BitPuffinlike import path/to/foo; export path/to/foo, or can I just do export foo?
13:14:02EXetoCfull path last time I checked
13:17:45BitPuffinwell
13:17:46BitPuffindo I even need to import to export?
13:19:29*EXetoC quit (Write error: Broken pipe)
13:19:58*EXetoC joined #nimrod
13:20:23OrionPKwell guys....
13:20:32OrionPKi ordered the new oculus rift devkit
13:24:39BitPuffinOrionPK: awesoooome
13:25:51OrionPKmaybe have the dev kit ported to nimrod ;)
13:26:20BitPuffindo it
13:30:54Trixar_zaVR gear is back in fashion? Oo
13:33:59BitPuffinerr, does include work in the same forms as import?
13:34:04BitPuffinor does it have to be a string with the file name
13:34:16BitPuffinlike include "allegro5/comalleg.nim"
13:41:50BitPuffina char** is a cstring in nimrod right?
13:42:03BitPuffinor rather an array of cstrings
13:43:45EXetoCpointer to array?
13:43:50EXetoCanyway, there are relevant helpers in system.nim
13:44:17BitPuffinyeah
13:44:26BitPuffinso for an argument that's probably an openarray[cstring]
14:01:12BitPuffinbah
14:01:25*Demos joined #nimrod
14:01:32BitPuffinI really don't like the convention in nimrod that the case for constants are the same as for procedures
14:01:37BitPuffincan't we agree on something else xD
14:04:20Demosprefix them withe a c
14:06:08*darkf quit (Quit: Leaving)
14:06:30*zahary_ left #nimrod (#nimrod)
14:06:57EXetoC"Constant" is the convention
14:07:14BitPuffinI personally prefer the CONSTANT_VALUE way
14:07:14EXetoCbut it's not always consistent
14:07:21BitPuffinEXetoC: not the last time I asked Araq
14:07:32*zahary_ joined #nimrod
14:07:42EXetoCok so it's not, but is still inconsistent
14:07:53EXetoCBitPuffin: apparently that's too much "shouting"
14:07:59EXetoCbut I see it just as another variation
14:08:28BitPuffinI dunno I quite like that naming convention
14:08:49BitPuffinactually I like bla_bla_bla for variables, BLA_BLA_BLA for constants, blaBlaBla for procs
14:08:53BitPuffinthat way they are different
14:08:58BitPuffinright now they are all the same
14:09:01EXetoCI think it's fine. Sure, it might remind you of C macros, but big deal
14:09:01BitPuffinand BlaBla for types
14:09:42Demoswell for CONSTANT_VALUE you may want to say cCONSTANT_VALUE since CONSTANT_VALUE will clash with a proc called constantValue
14:09:47BitPuffinI'm fine with the T and P prefix
14:10:13BitPuffinDemos: sure, but that's got nothing to do with just how they differ in style
14:10:16Demostrue
14:10:18BitPuffinbut yeah that might be a pretty good idea
14:10:32BitPuffinor even CCONSTANT_VALUE
14:10:33EXetoCDemos: that's rarely an issue though, and any collisions can be resolved with module qualifiers
14:10:47BitPuffinsince that's more alike TFoo
14:10:50BitPuffinwe don't do tFoo
14:11:04EXetoCwe don't do TFOO either
14:11:11BitPuffinI didn't say that
14:11:25BitPuffinTFOO would be a const with what I suggested
14:11:33EXetoCno, but it's uglier, and CCONSTANT_VALUE is pretty similar
14:11:42Demosright, it is sometimes a good idea, like in the openGL header with some of the consts
14:12:03EXetoCwell in that case you have no choice because they're in the same module
14:12:07BitPuffinit's not like we prefix all procs with proc either
14:12:28BitPuffinusually you might prefix things with something like the library name
14:12:45BitPuffinso allegro for example has the ALLEGRO_ prefix on consts, and al_ on procs
14:12:57BitPuffinalthough in my binding that's just alTheProc
14:13:06BitPuffinbecause that's nimrod convention
14:13:26BitPuffinI could have just made it theProc but they are not all in an "al" module
14:14:38Demosyeah I meant within the same module
14:14:39EXetoCwhat difference does that make? qualify if necessary
14:15:23*psquid joined #nimrod
14:15:29*Guest79651 quit (Ping timeout: 270 seconds)
14:15:47BitPuffinEXetoC: guess it lowers the risk of something clashing at all?
14:17:02*io2 joined #nimrod
14:20:39BitPuffinis it really required to import before you export? It would seem like that shouldn't be necessary
14:21:33*Trimsty joined #nimrod
14:21:36Demosis it really that hard to write a macro that does what you want?
14:21:40Demos:D
14:21:43EXetoCso you're then forced to specify the prefix all the time, which would negate the time saved by not resolving collisions
14:21:44TrimstyHi :D
14:22:38BitPuffinEXetoC: not realy, if you are a half decent typist you should be able to deal with the prefix
14:22:46BitPuffinwithout many extra milliseconds
14:22:56BitPuffinand writing the prefix doen't interrupt brainflow
14:23:07BitPuffinwhereas going and seeing like oh shit name collision gotta fix that does
14:24:45EXetoCgo against the grain if you want, but there's a reason why we have a module system
14:25:30BitPuffin:P
14:25:59*Demos quit (Ping timeout: 241 seconds)
14:26:26BitPuffina tuple is the best equivalent to a struct amirite?
14:26:48TrimstyHey, guys, how easy is it in Nimrod to create a GUI? As easy as in C, or is there a built-in lib? :P
14:26:54TrimstyKinda new to Nimrod
14:26:57EXetoCobjects are more strongly typed
14:27:19EXetoCbut both are basically like structs, so it's up to you to choose the right abstraction
14:27:45BitPuffinwell I'm thinking that structs don't have information hiding in C
14:27:49EXetoCmy vector types are all tuples, and the same goes or my matrix type I think
14:27:54BitPuffinso tuple seems like the equivalent
14:28:24EXetoCyou can export every field if you want
14:29:30BitPuffinI know
14:29:44BitPuffinbut it's like why bother when there is a construct that does that by default :P
14:32:53EXetoCI would use an object for more complex abstractions
14:33:04BitPuffinthis is not particularly complex
14:33:18BitPuffinit's altime.h
14:33:20BitPuffinez
14:34:01BitPuffinare __foo__ names disallowed?
14:34:16EXetoCI think __foo__ == foo
14:34:46BitPuffinah
14:34:55BitPuffinyeah that's just what I renamed it to
14:35:01BitPuffinbut it errored with __foo__
14:35:04BitPuffinwhich is strange
14:35:53EXetoCno, you can only do foo_bar apparently
14:36:45EXetoCand then you can reference it using one of the ~4 popular variations
14:37:36BitPuffinit's not ~4
14:38:07BitPuffinit could be f_O_o_bA_r
14:38:15BitPuffinmany possibilities
14:38:23BitPuffinguess that doesn't count as popular
14:38:31EXetoCf_O_o_bA_r is popular? :p
14:38:35EXetoCright
14:44:53*Demos joined #nimrod
14:46:52Demosobjects are closer to structs than tuples
14:47:03Demossince tuples can be structurally typed
14:47:40BitPuffinwhich means?
14:47:46DemosTrimsty, not wonderful. We do wrap GTK+ but that is hardly ideal.
14:48:21Demosit means that as long as the types are in the right order the tuples are the same, even if they are declared with different names
14:49:00BitPuffinhmm
14:49:06BitPuffingood point
14:49:11Demosnot sure exactly what the semantics are, but still
14:49:50Demosobjects that do not derive from anything have the same memory layout as a C struct
14:50:22BitPuffinalright good
14:52:35BitPuffinis _foo == foo?
14:52:51EXetoC_foo = error
14:52:56EXetoClet me try again to be sure
14:53:08EXetoCyep
14:54:32BitPuffinAH
14:54:34BitPuffinoops
14:54:36BitPuffincapsurs
14:56:47*Trimsty quit (Quit: Trimsty)
15:09:23BitPuffinhmm
15:09:40BitPuffincan individual possible values in an enum be optionally exported?
15:20:54*jbe_ joined #nimrod
15:22:18BitPuffinsomething like this should work right? https://gist.github.com/BitPuffin/9666225
15:23:31Demoswhat is nimrod's policy on sequence points?
15:28:37*hoppecl joined #nimrod
15:36:34jbe_i wrote an html template lib where you nest templates to produce a proc with a bunch of write calls. but the generated c code becomes obese with the nested nimrod template invocations, even with -d:release.. ideas?
15:43:50BitPuffinerr, the recommended thing by Araq when a C proc returns an int is to just set it to int right? rather than cint
15:44:41DemosBitPuffin cint and int are DIFFERENT data types
15:44:51BitPuffinI know
15:45:40Demosso why would you use the wrong type?
15:46:17BitPuffinI dunno
15:46:28BitPuffinI think I remember someone saying Araq told people to do that
15:46:59DemosI mean I guess it may cast on the return type, but I prefer to just match the type
15:49:09BitPuffinyeah
15:49:14BitPuffinI guess I'll do that to be safe or something
15:58:05*psquid quit (Quit: work)
15:59:05*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
16:21:42*Demos joined #nimrod
16:29:19*flaviu joined #nimrod
16:30:40*io2 quit ()
16:41:01*DAddYE joined #nimrod
16:48:17Varriountjbe_: Could you be a bit more specific?
16:51:28*Endy joined #nimrod
16:55:33jbe_Varriount: I have a template `%`(tag_and_params: expr, body:stmt), and use it to describe html templates, like this: %html: %body("lang", "en"): %p: template_print("Hello")
16:55:40jbe_it works, but the generated c seems to grow exponentially with the size of the template
16:57:30Varriountjbe_: Could you use a term-rewriting macro?
16:59:14Varriountjbe_: What *should* the C code look like?
16:59:57jbe_that's what i was thinking too, but i still don't see how the c code can grow that large. i'll look into it a bit more though. i'm still new to macros and the ast
17:01:07jbe_i mean, it was feeding gcc several hundred thousand lines
17:02:08*Demos quit (Ping timeout: 246 seconds)
17:02:20Varriountjbe_: Well, without something concrete to analyze, I can't do much but guess.
17:02:53jbe_ok, thanks anyway
17:03:36BitPuffinif a C funciton takes pointers to ints
17:03:39*Demos joined #nimrod
17:03:47BitPuffinis it safe to make the nimrod version take var cint's ?
17:04:06DemosBitPuffin: probably not
17:04:18BitPuffin:/
17:04:25DemosI would not use var params on a proc with the {.importc.} pragma
17:04:49Demosif you want em that bad write a seperate nimrod interface that uses the C wrapper
17:05:11BitPuffinyeah I might write an alternative or something
17:05:20BitPuffinto create a tuple do I have to put it in a type section
17:05:35BitPuffinor can I do return type as tuple[x, y, width, height: cint] ?
17:05:43Demosthat said var cint on a imported function will /probably/ end up as int* in C
17:06:01Demosyou can do that
17:06:05BitPuffincool
17:06:14VarriountBitPuffin: FYI, in C, an "int" is a "cint" in nimrod
17:06:36DemosVarriount: or an int32... usually
17:06:55VarriountDemos: And a cint is an int32
17:07:49Demosgaagh the way varargs work is totally strange, I am doing the olde copy and paste varargs but it is annoying because it means I will have to implemnet perf improvements like 4 times
17:08:13Varriountcopy and paste varargs?
17:08:28Demosproc func(a,b)
17:08:32Demosproc func(a,b,c)
17:08:35Demosproc func(a,b,c,d)
17:08:53VarriountDemos: Is it possible to use a dirty template.
17:09:31BitPuffinVarriount: yeah, that's why I said cint, what is your point?
17:09:35Demosmaybe but I found it hard figure it out, since I want to return a value. Also I need variadic iterators
17:09:57VarriountDemos: Could I see the code in question?
17:10:01DemosI want something like template<typename... T> ...... from c++
17:10:27VarriountDemos: Array of typedesc?
17:11:16Demosno, because each element is a typedesc of a different type
17:11:24Demoshttps://gist.github.com/barcharcraz/d6cd3fc46d44c141b529
17:12:04Demosand if I say varargs[typedesc] than the name() of each element is "none"
17:12:43Demosdoing varargs[expr] does not work either, since I need to get a type out of the expr.
17:13:45Demosin addition the iterator on line 19 fails with an internal error
17:14:11Demosso I am stuck with reimplementing everything like it is 1989
17:17:34EXetoCbacon
17:17:45BitPuffinVNUG so empty
17:18:14Demosall I want for christmas is shift @_
17:18:20EXetoCDemos: varargs[typedesc] or something?
17:18:31Demosnoooope, tried several ways of doing that
17:18:38DemosI do not get the "real" type
17:19:31Demosis varargs actually an array? or is it some sort of other construct (tupleish thing)
17:20:22EXetoCit's like openarray, but with an optional syntactic difference
17:20:30EXetoCfoo(1, 2, 3...)
17:21:03Demosbut then writing something where I can call it as foo(1, "foo", 5.0) or foo("foo", "foooooo", "bbar") is hard
17:21:30Demoslike how can one write printf?
17:22:15*nolan_d joined #nimrod
17:23:55EXetoCDemos: what do you mean? echo for example takes varargs
17:24:10Demosand for templates I am just not sure how to write them in a way where they have a return value like a function
17:24:20EXetoCbut echo relies on the auto-conversion feature as you can see
17:24:21Demosecho takes vararg[string] though right?
17:24:25Demosyeah
17:24:31EXetoCvarargs[T, `$`]?
17:24:31Demosoh wait
17:25:18VarriountBitPuffin: I could be on VNUG, however I would only be able to communicate via text chat.
17:25:27VarriountI'm in class at the moment.
17:25:33BitPuffinVarriount: ah
17:25:33Demossame Varriount
17:25:35BitPuffinI see
17:25:40BitPuffinwell then it's like irc anyway haha
17:25:52EXetoCso it's like a type vararg, but I don't know if it's specifically for the two-argument version
17:25:54BitPuffinexcept that I could talk I guess
17:25:56BitPuffinbut meh :P
17:26:10DemosI could do varargs[string, name] then use a macro to convert the string back into a type identifier
17:26:45Varriountwhy doesn't varargs[typedesc] work again?
17:27:08Demosbecause each typedesc in there needs to be of a different type
17:27:17Demoslike typedesc[int], typedesc[string] or whatever
17:27:26VarriountBut they are all of type typedesc?
17:27:37DemosI end up getting a bunch of like typedesc[none]. Right Varriount but that is not a generic type
17:27:39EXetoCtypedesc[T]?
17:27:51Demossorry it is not a concrete type
17:28:03VarriountHm.
17:28:10Demosbut then I would have like varargs[typedesc[int]] as my concrete type which is wrong
17:28:24Demostreating varargs as an array is super problematic
17:29:23VarriountDemos: What about the typeinfo module?
17:29:42VarriountCan you leverage run-time type info, instead of compile time type info?
17:30:19Demosno. My types are plain objects
17:30:38Demosand I would rather keep it to compile time anyways
17:32:30DemosI think what I want can be done with a template or macro, but I dont know how to go about doing it. Every time I try I get tricky compile errors and wierdness reguardeing how exprs and typedescs flow through my code
17:32:45EXetoCabout 9000 people have asked about variadic generics, but has anyone actually created a ticket?
17:33:08DemosI don't think so. It should be an RFC
17:35:31Demosshould I make some
17:35:44Demosanyone know of any other languages that have them, so far I can see c++ and D
17:35:45VarriountDemos: Typetraits?
17:35:49Demosnope
17:35:56Demostypetraits has like 2 functions
17:35:59Demosand does not help much
17:36:32Demoslike I said, this may be possible with like a template that takes varargs[expr] but it is harder to write than the copy-paste version
17:36:43Demosanyway, should I start the RFC
17:36:48VarriountYes
17:38:35VarriountIt's funny, one of the most recent tickets reminds me of a feature I proposed a while back - partial argument application via generic parameters
17:45:40DemosOK posted. I dont know how to tag it RFC though
17:48:31VarriountDemos: Done. Tagged it as "Feature" and "RFC"
17:49:10Demossweet, added in a link to a similar ticket for rust
17:50:40DemosI can not find anyone else that has variadic generics
17:51:48Demoseven haskell just lists out all the different versions
17:52:48DemosI think agada and idris can do them, but they hardly count
17:52:51Demos*agda
18:03:23*Demos quit (Ping timeout: 246 seconds)
18:03:25*q66 quit (Quit: Leaving)
18:05:45*q66 joined #nimrod
18:07:08*DAddYE_ joined #nimrod
18:07:14*DAddYE quit (Ping timeout: 246 seconds)
18:08:07*Demos joined #nimrod
18:10:18*DAddYE joined #nimrod
18:12:05BitPuffinthat's a weird error
18:12:16*DAddYE quit (Read error: Connection reset by peer)
18:12:19BitPuffincolor.nim(11, 46) Error: identifier expected, but found '= '
18:12:24*DAddYE__ joined #nimrod
18:12:47BitPuffinhttps://gist.github.com/BitPuffin/9670251#file-gistfile1-nim-L8
18:13:12BitPuffinit's supposed to say (11, 46) I just tried a thing
18:13:13EXetoCis it because of the commas?
18:13:32BitPuffinnope
18:13:35BitPuffinDon't think so
18:13:35*DAddYE_ quit (Ping timeout: 265 seconds)
18:13:44BitPuffinor hm
18:13:52*DAddYE joined #nimrod
18:13:55reactormonkcint(0) ?
18:13:59BitPuffinthere is supposed to be commas
18:14:17BitPuffinreactormonk: then why wouldn't it whine on the first one?
18:14:17reactormonksometimes the lexer does strange things
18:14:24reactormonkno idea :-/
18:14:49reactormonkBitPuffin, remove the 15 on live 10 and see what happens
18:15:04reactormonks/live/line/
18:15:04EXetoCshouldn't you use int literals and then specify the size pragma?
18:15:15BitPuffinnope changed when I did cint(num) style instead
18:15:55BitPuffinstill same error :/
18:15:58EXetoCenum {.size: T.}
18:16:22EXetoC*T.sizeof
18:16:37*DAddYE__ quit (Read error: Connection reset by peer)
18:16:39*DAddYE_ joined #nimrod
18:18:09Demosdoes https://gist.github.com/barcharcraz/f5278b275a4d758d4685 look like valid code?
18:18:35BitPuffinEXetoC: we didn't use nimrod int literals in portaudio
18:19:13BitPuffinadding the size pragma didn't help
18:19:21EXetoComit cint?
18:19:32BitPuffinno why
18:19:37BitPuffinwe used cint in portaudio
18:19:46BitPuffinhttps://bitbucket.org/BitPuffin/nim-portaudio/src/b34b9f179734753c4ed23ad0bd28ac0b817e7d58/src/portaudio.nim?at=default#cl-25
18:20:00BitPuffinbrb
18:20:10*DAddYE quit (Ping timeout: 246 seconds)
18:20:13Demostry just using 4 instead of 4.cint, casts may just happen
18:20:16Demosnot ideal but still
18:20:18EXetoCyeah but I don't know why it is failing
18:26:37*DAddYE joined #nimrod
18:29:01EXetoCDemos: I think the type always is that of the enumerators for the current C compiler
18:29:47Demosmost C compilers let you select the type
18:29:54Demosactually I think that is a standard c++ feature
18:29:59*DAddYE_ quit (Ping timeout: 240 seconds)
18:31:09EXetoCyes but it's not standard C is it?
18:31:55DemosI dont think so
18:32:15Demosbut I am sure GCC, clang, and MSVC all have extensions for it
18:34:51*seubert is now known as SPOONMAN
18:35:09*SPOONMAN is now known as seubert
18:38:15*flaviu quit (Ping timeout: 265 seconds)
18:40:34*brson joined #nimrod
18:40:44EXetoCDemos: I guess you can't use enums then for now, but that doesn't seem too common
18:40:54EXetoCbut it's a minor issue
18:44:10*io2 joined #nimrod
18:45:20EXetoCBitPuffin: those cint invocations for TErrorCode don't really do anything I think. but that doesn't matter because TErrorCode isn't being used anywhere
18:45:44*Demos quit (Ping timeout: 246 seconds)
18:47:28BitPuffinEXetoC: in PA?
18:48:09*DAddYE_ joined #nimrod
18:48:36BitPuffinremoved like the first half of the .cint stuff, and the error still happens on the same line
18:49:41BitPuffinso it's not that
18:50:14EXetoCBitPuffin: works for me
18:51:06*DAddYE quit (Ping timeout: 264 seconds)
18:51:14BitPuffinEXetoC: the whole thing?
18:51:36BitPuffinmaybe it's that it wants to count up on its own or something
18:51:43BitPuffinand doesn't want me to set every value
18:51:51BitPuffinthat's the only thing I can think of that would make sense with the error
18:52:52*BitPuffin wonders where Araq went
18:53:44*Demos joined #nimrod
18:54:01BitPuffinremoving all the .cint didn't work either
18:54:03BitPuffinsame error
18:54:04EXetoCBitPuffin: only the type section
18:54:05BitPuffinthe fuck is this
18:54:14EXetoCis the included file syntactically correct?
18:54:52EXetoCexporting would be a better idea, but then you have to specify every symbol
18:55:31BitPuffinit should be
18:55:37BitPuffindidn't have problems with it with other modules
18:55:46BitPuffinhttps://gist.github.com/BitPuffin/9671196
18:55:55BitPuffinit's included because nothing is and shouldn't be exported
18:57:06*BitPuffin quit (Quit: WeeChat 0.4.3)
18:57:19*BitPuffin joined #nimrod
19:01:49BitPuffinthis is driving me cray cray
19:01:58EXetoChow about just importing then?
19:02:16EXetoCBitPuffin: what if you remove everything except the type section?
19:02:30BitPuffinsame thing
19:02:33BitPuffinjust tried it
19:03:01EXetoCmy compiler version isn't too outdated, but I'll upgrade anyway and see if it changes the outcome
19:03:15BitPuffinerrr
19:03:17BitPuffinokay
19:03:25BitPuffinso when I copied and pasted it from github it worked
19:03:27BitPuffinwhat the fuck
19:03:31BitPuffinsome kind of encoding thing or what?
19:03:54EXetoCare you using vim?
19:04:28BitPuffinyeah
19:04:32BitPuffinwhat is this
19:04:34BitPuffinseriously
19:04:56EXetoC:set list
19:05:14EXetoCare the newlines identical?
19:05:29BitPuffinwell now I removed the stuff that wasn't working lol
19:05:37BitPuffinand I don't feel like messing it up again xD
19:05:43BitPuffinhow do I unset list?
19:06:20EXetoCactually that's not all you have to do. stackoverflow accept fail
19:06:47BitPuffinhowever it just happened in another file too
19:06:49EXetoC:set nolist
19:07:32BitPuffinand the newlines look fine
19:09:49BitPuffinand pasting to github and adding it again solves the problem
19:09:51BitPuffinwhat the actual fuck
19:10:58EXetoChow do you view the newlines? that advice was wrong like I said
19:11:26BitPuffinbah there is no "or" for cint
19:12:05*Demos quit (Ping timeout: 265 seconds)
19:12:07EXetoCstill dealing with enumerators?
19:13:02BitPuffinno I solved it by pasting to github and copying lol
19:13:14BitPuffinbut same thing will probably happen soon enough
19:13:48BitPuffinError: undeclared identifier: '‚' -____-
19:14:06BitPuffin result = (x[]‚ y[], w[], h[])
19:15:34EXetoC:o
19:18:09EXetoCI just tried something similar that works. got a test case?
19:18:53BitPuffinno?
19:18:57BitPuffinbut I can give you the proc
19:18:59*gXen joined #nimrod
19:19:20gXenI am looking at learnign a new language
19:19:44EXetoCso how did you determine that the newlines are uniform? try a hex editor :p
19:19:45BitPuffinhttps://gist.github.com/BitPuffin/9671711
19:19:58gXenwhen I stumbled upon nimrod, I was surpirsed I hear alot about scala, go, rust,.. lately, but howcome nimrod isnt more popular?
19:20:02BitPuffingXen: you've come to the right place
19:20:04EXetoCbut Nimrod is pretty lenient in this regard I think
19:20:06gXenconcise as python, fast as c?
19:20:14BitPuffingXen: because no corporate backing
19:20:16BitPuffingXen: yes
19:20:40*nande joined #nimrod
19:20:43gXenbut that means its the best language there is..
19:20:50BitPuffingXen: correct
19:21:07EXetoChm. check the syntax coloring
19:21:08gXenaccept low level languages, hardly anything beats c in speed, nothing beats python in pruductivity...
19:21:21gXenso... whats the catch?
19:21:30gXen(serious q)
19:21:30BitPuffingXen: immature compiler?
19:21:37BitPuffinwith a few bugs here and there
19:21:39EXetoCinstability? lack of industry support?
19:21:55BitPuffinstill in development
19:22:12gXenhow does nimrod deal with concurrency?
19:22:22BitPuffingXen: I'll link to a blog post
19:22:37BitPuffinhttp://nimrod-lang.org/blog/concurrency.html
19:22:42BitPuffinhttp://nimrod-lang.org/blog/concurrency2.html
19:22:46BitPuffintwo actually :P
19:24:10gXenI am looking at the code on the nimrod website ... and this is as easy to write as python... benchmark websites show this often beats c in speed... I am spinning in my chair...
19:25:06BitPuffinhard to see how it can beat C in speed when it compiles to C lol. But I guess if it makes it easier to write better code I guess it will produce wizard C that nobody would write :P
19:25:33EXetoCC written by human beings maybe
19:25:43BitPuffinyeah
19:25:46BitPuffinexactly
19:25:49gXensorry I meant C++
19:25:49BitPuffinour compiler writes better C :P
19:26:17*io2 quit ()
19:26:55EXetoCgXen: it can also compile to C++ (4 languages in total)
19:28:05gXenif I didnt know better.. I'd say the makers wanted fast python :)
19:28:44BitPuffinactually the syntax has more of a heritage from algol :P
19:28:56gXenhow does memory management work?
19:29:00*hoppecl quit (Quit: leaving)
19:29:04BitPuffingXen: there is an optional GC
19:29:11BitPuffinotherwise you can use alloc and free etc
19:29:19*OrionPK quit (Ping timeout: 264 seconds)
19:29:22BitPuffinthere is docs on how tho GC works
19:29:37BitPuffinhttp://build.nimrod-lang.org/docs/gc.html
19:29:41EXetoCBitPuffin: I did create type-safe alloc alternatives before, in case your still interested in that
19:29:49EXetoCit's in system.nim
19:29:59gXenis there any big company using it? or a known application made in it?
19:30:44gXenhow about libraries? web frameworks,...?
19:31:06EXetoChttps://github.com/dom96/jester
19:31:08BitPuffingXen: we got quite a few libraries
19:31:11BitPuffinand yeah
19:31:17BitPuffinjester is the only web framework atm
19:31:40BitPuffinwhen I get something done there will officially be a company using it
19:31:56gXenI am not so much interest in webframeworks, just wondering why this isnt more popular
19:32:31EXetoCgXen: no known apps yet, but a big part of the infrastructure is written in it (compiler, IDE, test reporter..)
19:32:33BitPuffinwell if you wanna write a larger web framework that would be nice
19:32:59EXetoCI think at least one company uses it, and that's all I know really
19:33:14gXenI am more interested in scientific computing, and most of all cryptography
19:33:24BitPuffinwe could use some of that
19:33:46gXenhow about crypto libs? I see md5 is there... any other hashing algos?
19:35:08BitPuffingXen: yes
19:35:25BitPuffinhttps://bitbucket.org/BitPuffin/scrypt.nim
19:37:24*DAddYE_ quit (Remote host closed the connection)
19:39:34gXenis sha1 and the like available?
19:40:57VarriountgXen: I think so, there's a hashes module
19:41:14BitPuffingXen: yes it's available in babel
19:42:35*DAddYE joined #nimrod
19:53:26gXenI guess I am sold: "I think someone is currently writing software for a real business that Java couldn't handle (memory and performance constraints)"
19:53:27reactormonkBitPuffin, IIRC you can't deposit stuff in tuples by position
19:54:35reactormonkgXen, yup, babel install sha1
19:55:44BitPuffinreactormonk: you can, look at the manual
19:56:10reactormonkBitPuffin, sap
19:56:22reactormonkBitPuffin, but it expects an identifier there :-/
19:59:55gXenis scrypt and bcrypt in nimrod?
19:59:56EXetoCBitPuffin: I think the first comma is a unicode comma
20:00:40BitPuffingXen: I linked you to scrypt
20:00:43BitPuffinhttps://bitbucket.org/BitPuffin/scrypt.nim
20:00:47EXetoCBitPuffin: value 8218
20:01:17EXetoChttp://www.fileformat.info/info/unicode/char/201a/index.htm
20:01:20EXetoC:-)
20:01:29*bbodi joined #nimrod
20:01:44bbodiHi all!
20:01:54EXetoCbbodi: morning
20:01:58EXetoCor something
20:02:10bbodiits night here
20:03:37bbodilet me ask you a question guys: what is your opinion about the_syntax_with_undercores? Nowadays i think about it a log. I am a Java programmer, and hell it, I think this underlined syntax helps much more the initial understanding of the source code than camelCase
20:04:05BitPuffinEXetoC: what is your point
20:04:24EXetoCBitPuffin: that it's not the ASCII comma, hence why the compilation fails
20:04:50BitPuffinso I'm not allowed to use unicode?
20:04:51EXetoC‚ != , ... :p
20:04:52BitPuffinthat's bull
20:05:34EXetoCisn't that a lot of work to support? there are other variations of other ASCII symbols that you have to take care of
20:06:14BitPuffinI dunno
20:06:27BitPuffinhaven't had any similar issue in any other programming language
20:06:33BitPuffinand it's not like I'm doing it on purpose
20:06:35BitPuffinit's probably fucking mac
20:06:48BitPuffinor is it like
20:06:53BitPuffinvim setting or what
20:07:51EXetoC:E
20:08:13*vbtt joined #nimrod
20:08:17*Demos joined #nimrod
20:08:28BitPuffin:/
20:08:36BitPuffinand it's been working otherwise
20:08:41BitPuffinlike for proc parameters
20:08:50BitPuffinit's not like I have been writing procs with only one parameter
20:08:55BitPuffinso I hardly think that's the problem
20:09:17EXetoCbut that's the only non-ascii comma
20:09:59*DAddYE quit (Remote host closed the connection)
20:10:03BitPuffindafuq
20:10:08EXetoCin that snippet
20:10:11BitPuffinwhat the hell is going on
20:10:18BitPuffinwait
20:10:19EXetoCand I guess you managed to insert such a comma in that enum code as well
20:10:26BitPuffincould it be like if I accidentally do ‚
20:10:30BitPuffinwith alt comma
20:10:33BitPuffincheck
20:10:41BitPuffinis left one unicode and right one ascii now
20:10:45BitPuffin‚ ,
20:11:01BitPuffinor could it be caps lock
20:11:03EXetoCBitPuffin: alt gr?
20:11:03BitPuffin, ,
20:11:09BitPuffinmac doesn't have alt gr :P
20:11:37EXetoCit's altgr on my system apparently
20:11:59*Demos quit (Read error: Operation timed out)
20:12:10BitPuffinwll
20:12:16BitPuffinwas any of the commas I wrote unicode
20:12:19BitPuffin:P
20:12:52EXetoCyes, those that triggered the error messages
20:13:00BitPuffinno but I meant here in irc
20:13:47EXetoCsome of them
20:13:53BitPuffinthe ones to the left?
20:14:03EXetoCcan you see a different with your font?
20:14:11EXetoC¸¸¸¸¸¸¸,,,,,,,,¸¸¸¸¸¸,¸,¸¸¸¸,¸¸¸,,,
20:14:24BitPuffinisn't that periods and commas? :P
20:14:32BitPuffin,,,,,,,,,,‚‚‚‚‚‚‚‚‚‚‚‚‚‚,,,,,,,,,,,,‚‚‚‚‚‚‚‚‚‚
20:14:35BitPuffinone of them looks a bit thicker
20:14:42BitPuffin,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
20:15:24*Demos joined #nimrod
20:15:42EXetoCyour commas: ‚‚‚‚‚‚‚‚‚‚‚ the commas that I managed to generate: ,,,,,,,¸¸¸¸¸,,,¸¸¸¸,,,,¸¸
20:16:04EXetoCI think it should be reported, because that's very subtle in some cases
20:16:41BitPuffinwell the ones you generated looked different sometimes
20:16:53EXetoCbut how exactly should it be handled? consider this: "var åäö = 3; echo åäö"
20:17:18EXetoCBitPuffin: that's two different commas, none of which looks like yours
20:17:32BitPuffinhrm
20:17:37BitPuffinthen how did this even appear in my source
20:17:40BitPuffinI'm confussled
20:17:56BitPuffinIT IS 2014!
20:18:02BitPuffin._____:
20:18:11*bbodi quit (Remote host closed the connection)
20:18:14EXetoCapparently you typed it here
20:18:31EXetoCso why are you asking?
20:19:39EXetoCunless you just pasted it, but you did mention alt+,
20:21:09EXetoCBitPuffin: you need to stop doing weird stuff, so that you can focus on important stuff instead :>
20:21:13EXetoCok enough spamming. later
20:28:58BitPuffinEXetoC: well I tried if maybe alt+comma would result in that unicode comma looking thing but it didn't
20:29:03BitPuffinEXetoC: what do you mean weird stuff xD
20:46:07*DAddYE joined #nimrod
20:59:35EXetoCBitPuffin: weird characters, generic types; that kind of stuff
21:00:49*Matthias247 joined #nimrod
21:07:28BitPuffinEXetoC: okay I'll just ignore the benefits of nimrod then and just use it as if it was C with a nice syntax :P
21:07:55vbttall commas are unicode, btw
21:07:57BitPuffinor like who needs to redirect in a webapp :P
21:12:37NimBotAraq/Nimrod devel c3597f4 Zahary Karadjov [+0 ±1 -0]: fix #1018... 4 more lines
21:12:37NimBotAraq/Nimrod devel b8f44f3 Zahary Karadjov [+0 ±2 -0]: fix the handling of "msg" tests
21:12:49EXetoCvbtt: ok, not(0x2c) commas
21:14:14EXetoCBitPuffin: are you going to edit your ticket now that we've established the cause?
21:14:49EXetoCI'll just submit a reply
21:16:03BitPuffinEXetoC: try first if it compiles if you fix it
21:16:08BitPuffinlike replace it with a real comma
21:16:15BitPuffinjust forward declare the proc that you don't have
21:18:04EXetoCno problems there. gonna upgrade the compiler now
21:18:43*skyfex joined #nimrod
21:24:38NimBotAraq/Nimrod devel c82a04e Zahary Karadjov [+0 ±1 -0]: fix #1016
21:28:49*Endy quit (Ping timeout: 245 seconds)
21:37:26skyfexAraq: Do you know if the packed pragma might affect the GC? Does it assume that pointers are word-aligned?
21:44:16skyfex(for the docs)
21:45:40NimBotAraq/Nimrod devel 875c8d6 Zahary Karadjov [+1 ±1 -0]: fix #1015
21:52:04*brson quit (Ping timeout: 252 seconds)
21:53:54*brson joined #nimrod
22:03:04Araqskyfex: yes, that is assumed
22:03:32Araqbut I can't see anyone using 'packed' on a type containing refs ...
22:03:52fowlzahary, ty!
22:03:58Araqwell it's a good point, added it to my todo
22:04:10skyfexAraq: Yeah, me neither, just figure it's good to get in the docs.. you never know what people will try
22:04:18skyfex"it'll save memory!"
22:04:40Araqthere are lots of other type properties that prevent GC'ed memory
22:04:57Araqwe can easily make the compiler check packed is not used improperly
22:06:35*gXen quit (Quit: gXen)
22:07:26Araqhi vbtt welcome back
22:09:02vbtthi Araq, thanks. how are things?
22:09:59Araqcould be worse
22:10:25DemosAraq, I gotta go, but you should merge my pull request into the opengl wrapper
22:10:39AraqDemos: ok
22:11:35Araqping Varriount
22:11:43fowlBitPuffin, what means this "my allegro binding"
22:12:16*Demos quit (Quit: Leaving)
22:13:16skyfexAraq: Btw, I held a small presentation for some fellow engineers (just 5 people) yesterday. They seemed really interested.
22:13:39skyfexI also got a little further with my HDL idea
22:14:26skyfexI think the BitVector type can perhaps be completely defined as I want in devel
22:15:26Araqshould be possible yeah
22:15:27skyfexAnd I made a proof of concept of a type which has a "now" value and a "next" value, which is essential for digital circuit simulation
22:15:39skyfexIt was surprisingly easy
22:16:09Araqnot sure if your approach is the right one though :P
22:17:07Araqyou could also think about a #!hdl syntax/grammar
22:17:19*cark joined #nimrod
22:17:37skyfexMy current approach is to define Bit = range[0..1] and BitArray[I] = array[I, Bit] .. and work from there
22:18:59*cark2 quit (Ping timeout: 240 seconds)
22:19:14skyfexI was surprised that I managed to create a literal syntax for hex-values which generated a type of the right width (4 times the number of hex digits).. and the syntax is actually identical to VHDL: X"CAFEBABE"
22:20:04skyfexBut I also think it makes sense to do 0xCAFEBABE[0..31]
22:20:36skyfexAraq: Good point about #!hdl .. I knew about the feature, but I hadn't thought about using it
22:20:47BitPuffinfowl: yeah I'm binding allegro
22:21:10fowlBitPuffin, im almost done with mine bro
22:21:19BitPuffinwaaaAAAAaaat
22:21:27BitPuffinyou're killing me xD
22:21:32fowllol >_>
22:21:41BitPuffinyou didn't seem like you wanted to do it
22:22:02BitPuffinso the whole full thing?
22:22:04fowlBitPuffin, i should say im done with the interesting stuff, the rest is function headers i have to port, that code of yours in the issue is wrong btw
22:22:19BitPuffinwhy?
22:22:35fowlBitPuffin, you're giving the function nil pointers
22:22:46BitPuffinyeah I was wondering if I had to allocate or it would do it for me
22:22:51fowlnoo bp
22:22:57BitPuffinbut I guess it wouldn't be able to set the address now that I think about it
22:23:09fowlall you have to do is alFunc(result[0].addr, result[1].addr, ...) no clean-up neccessary
22:23:31BitPuffintrue
22:23:36fowlBitPuffin, thats why i import functions like that (that take a pointer to something to be filled up) as var
22:24:03BitPuffinyeah I was asking earlier if it will work if I make it var
22:24:15BitPuffinbut it didn't seem certain
22:24:19fowlBitPuffin, also, check it: https://gist.github.com/fowlmouth/9675245
22:24:58BitPuffinoh so you are nimrodifying it?
22:25:11BitPuffinthought you were the close to the metal guy :P
22:25:37fowlthis isnt nimrodifying
22:25:54BitPuffinanyways, I have done base, altime, bitmap, bitmap_draw, bitmap_io and color :P
22:26:10BitPuffinwell I mean TEvent
22:26:15BitPuffininstead of TAllegroEvent
22:26:36fowlhowd you do TEvent? i have a feeling variant type will work here btw
22:27:00BitPuffinhaven't done it yet
22:27:11BitPuffinbut someone in #allegro was mentioning it I think
22:27:20BitPuffinand that it would seem like you'd do a variant type
22:27:29BitPuffina Varriount type hurr hurr
22:27:44NimBotAraq/Nimrod devel ca255fe Zahary Karadjov [+0 ±4 -0]: msg -> errmsg
22:27:51fowlBitPuffin, tbh it is better to use a union
22:28:04BitPuffinbelieve he said variant union
22:28:11BitPuffinbut wtf is a union in nimrod anyway :P
22:28:34Araqnimrod has .union now as a pragma
22:28:43Araqwhich makes wrapping much easier
22:28:55Araqbtw c2nim already knows about it
22:30:21fowlAraq, else: discard doesnt work in variant type
22:30:24fowlonly else: nil
22:31:04Araqyeah I know
22:31:07Araqit's not a bug
22:31:16fowlok
22:31:22AraqI haven't made up my mind about this detail
22:31:51Araqboth are kind of ugly in this context
22:31:56BitPuffinfowl: are you gonna do all of it?
22:32:00fowli also have a problem where {.push importc: "al_$1".} sometimes doesnt work
22:34:12fowlBitPuffin, i dont want to repeat the parts you've done
22:34:30BitPuffinwell you can have it if you want
22:34:31fowlyou should add your stuff to mine
22:34:36fowlok
22:34:39BitPuffinbut we wrap things differently
22:34:43BitPuffinso I'm not sure how useful it is
22:34:57fowldifferent how
22:35:12BitPuffinwell like I change the style of names
22:35:17BitPuffinso to alDrawBitmap
22:35:20BitPuffininstead of al_draw_bitmap
22:35:22fowlthats a PITA though
22:35:26BitPuffinyeah
22:35:31fowlwith draw_bitmap i can do importc:"al_$1"
22:35:32BitPuffinthat's why I haven't done more xD
22:35:52BitPuffinsure
22:35:54BitPuffinbut yeah
22:35:58BitPuffindid you use c2nim?
22:36:01BitPuffinI didn't
22:36:03fowlno
22:36:05BitPuffinI could have though
22:36:08fowlall the functions are wrapped in AL_FUNC()
22:36:13BitPuffinjust run the headers through the pre processor first
22:36:33BitPuffinez
22:36:34fowlc2nim has a preprocessor
22:36:38BitPuffinbut I didn't wanna do that
22:36:54BitPuffinbecause I thought I would do it better by hand
22:36:57fowldunno if #def AL_FUNC(a,b,c) a b c would work
22:37:01BitPuffinwith c2nim there is always fun stuff that happens
22:37:24BitPuffinwell I mean run it through gcc or clang but only do pre processor steps
22:37:31BitPuffinthen you'd get the C style names
22:37:46*jbe_ quit (Quit: Leaving)
22:38:14fowli may have judged allegros api harshly
22:41:13*nolan_d left #nimrod (#nimrod)
22:42:32BitPuffinyes
22:42:37BitPuffinthey do it for a good reason
22:42:53BitPuffinfowl: by the way do you know how the al_run_main stuff works?
22:43:01fowlno
22:43:11Araqisn't allegro dead for years now?
22:43:25BitPuffinit basically helps with getting it working on osx without having to change code
22:43:32BitPuffinAraq: not at all, what are you on? crack?
22:43:45Araqbeer
22:44:04BitPuffinfowl: in C/C++ the main name is mangled automatically by the preprocessor but in other languages you have to use al_run_main
22:44:39BitPuffinso what you could do to make it nice is to wrap it so that you can just do alMain: and then your code in there and take the body of that and put it in a proc that is passed to al_run_main
22:44:41BitPuffingot it?
22:44:59fowlno
22:45:04fowlwhere is this function even defined
22:48:45fowlBitPuffin, someone who uses os x will have to figure out how to deal with that
22:49:06BitPuffinhmmm
22:49:09BitPuffindon't know anybody
22:49:10fowlBitPuffin, SDL does the same thing, someone got around it by setting an environment variable
22:49:15BitPuffinbut you are supposed to use it everywhere
22:49:20BitPuffinbecause it makes it so no cade change is required :P
22:49:28BitPuffinfowl: I think it's defined in base iirc
22:49:41fowlthe function doesnt return
22:50:03BitPuffinlol
22:50:06BitPuffinyes it does
22:50:10fowlits not as simple as wrapping main code in alMain:, main code may define global variables that are suddenly not global anymore
22:50:11BitPuffinwhen your function returns :P
22:50:43BitPuffinare you also on beer?
22:50:49*zahary quit (Ping timeout: 240 seconds)
22:50:56fowlim quoting someone on the forums
22:51:07fowlYes, al_run_main. It will never return, but you pass it a C function which we be called from another thread. Call al_init and so on from that other function then as if it was your main() function.
22:51:26fowlBitPuffin, this is the domain of someone who can actually test it (an OS X developer)
22:51:29fowlnot me
22:52:17BitPuffinI am on osx
22:52:19BitPuffinbut the point is
22:52:22BitPuffinyou should use it not only on osx
22:52:25BitPuffineverywhere
22:52:34BitPuffinso that the code will still work on other platforms
22:52:38fowlok the job is yours
22:52:42fowlmake it work
22:52:52BitPuffinsure
22:52:56BitPuffinwhen you publish your wrapper
22:52:58BitPuffinand please god
22:53:03BitPuffindon't tell me it is in fawltek
22:53:11fowlur in fowltek
22:53:17BitPuffinur mom's in fowltek
22:53:21fowlimport fowltek/bitbuffin
22:53:30BitPuffinimport fowltek/fowlsmom
22:53:53*brson quit (Ping timeout: 246 seconds)
22:55:55*brson joined #nimrod
22:56:11fowlBitPuffin, i just wanted my name to appear in the code of others :(
23:02:26BitPuffinlol
23:02:48BitPuffinfowl: anyways, if the al_run_main stuff works as it should on one platform, chances are it will work on others too
23:02:49BitPuffinbut yes
23:02:52BitPuffinI'll test it
23:02:57BitPuffinobviously
23:02:59BitPuffinsince you know
23:03:03BitPuffinI plan to use allegro :P
23:04:18*skyfex quit (Quit: Computer has gone to sleep.)
23:04:26fowlBitPuffin, it should run now
23:05:38*skyfex joined #nimrod
23:06:05*Demos joined #nimrod
23:07:55BitPuffinyou're done? :P
23:10:33BitPuffinkeep in mind that it IS useful to wrap errthin. Even if some of it are stdlib things
23:10:45BitPuffinbecause it makes it work on platforms where the stdlib hasn't been ported
23:10:51BitPuffinsuch as mobile
23:10:59fowlno im not done but i have a window openning and closing, do the run_main thing
23:12:34BitPuffinah awesome
23:12:36BitPuffingood work
23:12:42BitPuffinare you gonna wrap it in a template
23:12:56BitPuffinso that you don't have to do like in your code like var main = procah,ur,huras, uauhsacr
23:12:59BitPuffinor whatever you'd do
23:13:01BitPuffin:P
23:13:11*psquid joined #nimrod
23:14:10fowlno
23:14:25fowlBitPuffin, i think you should just look at al_run_main and copy the osx portion out of it
23:16:40AraqDemos: the GLHandle change might break code
23:17:02Araqnot sure about the "framework" full path stuff
23:17:56*xenagi joined #nimrod
23:22:03BitPuffinfowl: that would be retarded
23:22:16*OrionPK joined #nimrod
23:22:46fowlBitPuffin, this whole situation is retarded
23:22:55BitPuffinthe whole point is that you shouldn't have to change your code
23:23:00BitPuffinwhether you made it in windows, osx or linux
23:23:08fowlikr
23:23:09BitPuffinit should really just be something like
23:23:17fowlwhy cant i just call install_system on os x? retarded os x
23:23:37BitPuffintemplate alMain(e: expr) =
23:24:10BitPuffinvar main = proc(argc: cint, argv: openarray[cstring]) = expr
23:24:18BitPuffinal_run_main(main)
23:24:23BitPuffinor something along those lines
23:24:27BitPuffinsimple ass hat :D
23:24:31fowlnimrod has its own main
23:24:36BitPuffinyes
23:24:41BitPuffinand that's what this thing solves
23:24:54fowlwell then do it
23:25:00BitPuffinit deals with languages who likes to steal main
23:25:10BitPuffinwhich some operating systems don't like
23:25:13fowlno, it deals with broken OS
23:25:28BitPuffinwell yeah osx sucks but it can't be the only one that does this
23:25:34BitPuffinsame thing probably happens on some mobile os too
23:25:48BitPuffinwhich is why you shouldn't "just copy the osx part"
23:26:02BitPuffindoing this makes it more maintainable for any forseeable os :P
23:26:08fowlBitPuffin, well then figure out how to make it automatic and invisible to the user
23:26:13BitPuffinbut yeah I can implement it when you have done the binding
23:26:32BitPuffinfowl: the easiest is to just have them put everything inside alMain
23:26:36BitPuffinso they do alMain:
23:26:38BitPuffinindent their code
23:26:39fowlBitPuffin, im having trouble finding anything that uses this function
23:26:40BitPuffinand go
23:26:42BitPuffinez
23:26:47fowlthen do it
23:26:54fowlif its so ez stop talking to me
23:27:08fowli looked at allegro5 binding for rust, D
23:27:09BitPuffinL39
23:27:14BitPuffinhttps://github.com/SiegeLord/DAllegro5/blob/master/example.d#L39
23:27:28BitPuffinthey did almost the samet hing there
23:27:38fowlyea i couldnt find where al_run_allegro was defined
23:27:40BitPuffinjust that they made it so that you pass a function
23:27:43BitPuffinin base
23:27:46BitPuffinI even told you
23:27:48BitPuffinyou drunk :P
23:28:05fowlgreat
23:28:27fowlim wasting time talking about this since you already said you would figure it out
23:28:35fowlbbl, smoking w33d
23:28:41BitPuffinhttps://github.com/SiegeLord/DAllegro5/blob/936a94c4a593a1594c70b53029f4efbeec252837/allegro5/system.d#L27
23:28:49BitPuffinthat's how he implemented the run_allegro thing
23:28:51BitPuffinlol
23:28:53BitPuffindrugface :D
23:29:01fowlyes
23:29:04BitPuffinbut yeah
23:29:04fowlfun with threads
23:29:07fowlgood luck with that
23:29:15BitPuffinif you bind the library
23:29:17BitPuffinall of it
23:29:20BitPuffinI'll deal with this part
23:29:22BitPuffinez
23:29:24BitPuffinEZ!!!
23:29:28fowlupload what you have so far
23:29:32BitPuffinwhy
23:29:37BitPuffinwe bind things differently anyway
23:29:45BitPuffinI didn't get far because I did everything so manually
23:30:04fowlbecause changing a bunch of stuff from alFooBar to foo_bar will be easier than from AL_FUNC(void, alFooBar, (..)))
23:30:28BitPuffinok
23:30:30BitPuffinit's up
23:30:49BitPuffinhttps://bitbucket.org/BitPuffin/nim-allegro5
23:31:18*eigenlicht quit (Ping timeout: 264 seconds)
23:31:20fowlcool thx
23:31:57BitPuffinprobably plenty of mistakes haha
23:32:07BitPuffinjust because sometimes you type what you are reading etc
23:32:09BitPuffinbrains
23:32:12BitPuffinwho need em amirite
23:33:50fowlthis is good, they're in separate files that will help a lot
23:34:05fowlc&p
23:37:27BitPuffinyou aren't doing it in separate files? -_____-
23:37:42BitPuffinyou do realize that some stuff is addons etc?
23:37:49BitPuffinit shouldn't be in the same file :P
23:37:56BitPuffinit was split up in the headers for a reason
23:37:59EXetoCyou're an addon
23:38:01BitPuffinyou might only use one part of the lib
23:38:03BitPuffinOH NO HE DIDN*T
23:38:42VarriountMEEEP
23:39:00BitPuffinI guess we have the DCE, but still, increased compile time :P
23:41:16fowlBitPuffin, no
23:41:31fowlits not nice to have all these module names
23:41:32BitPuffinfowl: yes
23:41:47BitPuffinwell what about the addons?
23:42:09fowlthats different
23:44:22VarriountWhats DCE?
23:44:55VarriountAlso, is anyone on VNUG? I want to know if I should switch from my desktop to my laptop.
23:45:42BitPuffinI'm on but I'll probably not talk, playing metroid
23:47:45*askatasuna joined #nimrod
23:49:31*darkf joined #nimrod
23:59:28*q66 quit (Quit: Leaving)