<< 09-03-2014 >>

00:00:18Araqzezba9000: ah so you're filwit's brother
00:00:52zezba9000am I? Never! ... yes I am :)
00:01:51Demos_wait... why the hell did they put #pragma pack(1) on a struct with all unsigned char members
00:03:13renesacDemos_, for packing them tightly on a vector?
00:04:17Araqzezba9000: converting c# to nimrod is ... a challenging task
00:04:55Araqmany of C#'s concepts do not map directly to nimrod
00:05:20zezba9000Araq: Not to much, iv'e already done prototyping for converting C# to C++, HLSL and GLSL ect... But Nimrod as a great GC, so it should not be to hard, just time consuming.
00:05:28Demos_but a struct filled with 8bit data members is gunna be aligned
00:05:33*EXetoC quit (Quit: WeeChat 0.4.3)
00:05:55Araqzezba9000: how do you translate interfaces?
00:06:57renesacDemos_, aligned by n bytes, right? they probably don't want this alignment
00:07:21zezba9000I need to look at Nimrod more to give you a better answer, but there is always a way.
00:07:21zezba9000Nimrod doesn't support object inheritance?
00:07:34Araqit does but no MI, no interfaces
00:07:44Demos_they are using #pragma pack(1) which says to align everything to single bytes, and the natural alignment of a bunch of bytes is that
00:07:44Araqyou can implement interfaces via closures
00:08:02renesachow many 8bit data members are there?
00:08:07Demos_three
00:08:08Araqwhich is surprisingly hard to grasp for many people ... I wish I knew why
00:08:24renesacso, in a vector they will probably be aligned by 4 or 8 bytes
00:08:32renesacwasting space
00:08:44Demos_if I just let the library deal with allocation I should be fine though
00:08:47renesacwith no benefit if you are acessing them one byte at a time
00:08:57zezba9000Araq: It doesn't need to support C# fully... C++ doesn't and it could be done. As long as Nimrod supports virtual methods it should be fine
00:09:17Demos_nimrod's "virtual methods" are different than c#'s
00:09:26zezba9000In what way?
00:09:50AraqDemos_: I think they are close enough
00:09:51Demos_they are multimethods
00:09:56renesacDemos_, as long as you are not sharing vectors containing that struct with the C code, maybe
00:10:14AraqDemos_: c# has multi methods too btw. nobody noticed though.
00:10:19zezba9000If they both support virtual methods the logic is can be converted to be the same
00:10:23Demos_Araq: with dynamic right?
00:10:38Araqyup
00:11:02VarriountAraq: Haiku's filesystem layout is quite... refreshing
00:12:11zezba9000For C# system libraries, for say the "System.IO.FileStream" object I would make shims in Nimrod that emulate the C# system APIs
00:12:55zezba9000So after conversion, you could lay the C# code next to the Nimrod version and the logic would be identical for the most part.
00:14:29Araqzezba9000: well you seem to have quite some experience with it and a subset of C# seems fine so go ahead.
00:14:47VarriountAraq: Couldn't interaces be done via typeclasses?
00:15:18AraqVarriount: no typeclasses work at compile-time, interfaces at runtime
00:20:29zezba9000Araq: "it does but no MI, no interfaces" -- About this: So your saying I could not convert something like "class A : B, IC, ID" ?
00:21:11zezba9000Sorry I guess I could ask FIL to have him fill me in.
00:21:15Araqyou can convert it, but it's gonna be ugly
00:23:29zezba9000Well how do you normally do OO in Nimrod then? If I can't do that, it would break casting in the code
00:23:35zezba9000**casting types
00:26:04Araqhmm yeah, I guess you should simulate MI with 'cast'
00:29:23Demos_you should probably do MI by implementing the vtbl yourself
00:29:52Demos_and the trouble with "real" MI like C++ has is that you have to move the pointer around when you cast to a base
00:29:57Demos_I gotta eat
00:34:22*Demos_ quit (Ping timeout: 264 seconds)
00:40:09*darkf joined #nimrod
00:41:14Araqzezba9000: I'm sure we'll come up with enough hacks to make it work good enough
00:41:15*psquid joined #nimrod
00:41:18Araqgood night
00:41:44zezba9000Araq: I'm having Philip show me how it could be done now.
00:42:05zezba9000Although he said, someone is making the interface model as well
00:44:08Araqnot sure what that means
00:44:30Araqpeople here usually use component systems for games from what I can tell
00:45:58zezba9000He said zahary has been working on an interface system thats more similar to C#.. not sure yet... as you said, i'm sure we can figure it out
00:46:39*Matthias247 quit (Quit: Matthias247)
00:47:30Araqthat would be the typeclasses
00:47:47Araqwhich are compile-time entities
00:47:54*io2 quit ()
00:47:57Araqbut perhaps that's enough for your use cases
00:52:24renesacI get ' Error: named expression expected' in this line: var res: TimeitResult = (best: 0.0, loops: loops, repeats: repeats)
00:53:22renesacTimeitResult is a tuple
00:55:33Araqbut report, but I already know the cause
00:55:36Araq*bug
00:55:44Araqit's in a template right?
00:55:47renesacyes
00:55:54Araqyeah yeah yeah
00:56:04renesacok, I will open a issue
00:56:39Araqworkaround: rename the 'repeats' parameter
00:57:06renesacand the loops, right?
00:57:12Araqright
00:57:15Araqin fact
00:57:21Araqit might not be bug
00:57:49Araqyou have to realize templates are stupid and they will substitute their parameters pretty much everywhere
00:57:57Araqbut report it, I'll have a look
00:58:07renesacwell, my work around is defining it, and then setting each one of them separatedly
00:58:19renesacbut now I'm getting another weird error
00:58:46renesac"Error: identifier expected, but found '3'"
00:59:08renesaccalling the template, that has only int args
00:59:20renesacand a stmt last arg, of rouce
00:59:24renesac*course
00:59:46Araqtemplate t(p): expr = (p: p)
01:00:03Araqt(3) --> (3: 3) # identifier exprected but found '3'
01:00:10Araqgood night
01:00:18renesacgood night
01:02:52*Demos_ joined #nimrod
01:16:56*16WAA11SD quit (Remote host closed the connection)
01:20:16*psquid quit (Quit: reboot)
01:20:37*carum quit (Remote host closed the connection)
01:23:25*flaviu quit (Remote host closed the connection)
01:24:03*psquid joined #nimrod
01:32:09*darkf quit (Quit: Leaving)
01:32:23*darkf joined #nimrod
01:37:50*carum joined #nimrod
01:47:30*carum quit (Remote host closed the connection)
01:49:16*Demos_ quit (Ping timeout: 265 seconds)
01:50:22DemosVarriount, ping
01:57:35Skrylarmeep
02:05:43*Demos_ joined #nimrod
02:06:29*brson joined #nimrod
02:22:03*carum joined #nimrod
02:22:24*zezba9000 left #nimrod (#nimrod)
02:23:45SkrylarWell that is awkward. The 64-bit offset basis for FNV doesn't actually fit in a 64-bit field
02:25:35fowlfnv = fallout new vegas?
02:50:25*Varriount quit (Ping timeout: 240 seconds)
03:04:49Skrylarfowler-noll-vo hash
03:12:04renesacSkrylar, have you seen this topic: http://forum.nimrod-lang.org/t/320
03:12:05renesac?
03:12:48Skrylarrenesac: no, and i've already written my siphash code
03:13:01renesacyeah, I know...
03:13:43Skrylari'll probably put that up this evening, i have some other things on this branch to port over
03:15:44*carum quit (Remote host closed the connection)
03:16:41renesacand are you sure that you are using an u64 to store this offset basis?
03:16:57renesacas it should fit..
03:17:12Skrylari told it to and it didn't work; pasted the number in to windows calculator out of curiosity and it didn't fit either
03:17:28renesachum
03:19:16renesac0x1465_0FB0_739D_0383 <-- is this one?
03:19:45renesacfrom 14695981039346656037
03:20:49*Demos_ quit (Ping timeout: 240 seconds)
03:23:13Skrylarthat looks like it
03:23:34Skrylar # 64 bit offset_basis = 14695981039346656037
03:23:51renesacyeah, it fits on 64bits
03:24:05SkrylarError: number [..] out of valid range
03:24:30renesactry the hex version
03:24:49Skrylari also trie 'u64 and uint64() around that earlier
03:25:13renesacyeah, the hex version works
03:25:28renesacI dunno why the normal one don't
03:26:01*DAddYE joined #nimrod
03:29:06Skrylari'm not sure if there is a 'correct' way to hash a number
03:29:17SkrylarI looked at the templates I used for it, and they just pass it off like binary data
03:29:34Skrylarwhich is ignorant of big/little endian, but i'm not sure who is using data hashes in a context where big/little endian matters
03:30:07renesacwell, for hash tables the endiannes don't matters
03:30:11Skrylarsiphash specifically uses little endian internally for its magic numbers, while network byte order (the "correct" endian to use for servers and networking) is big
03:30:29renesacfor MACs, etc, it matters
03:30:40Skrylarit would not be hard to make the hash functions use a specific one (is there a when 'big endian' in nimrod?) but i'm not sure if that is the correct thing to do
03:30:41renesacprobably because siphash is optimized for intel? I don't know
03:30:51Skrylarin my experience, hash APIs usually don't ask
03:31:37Skrylarall though Siphash also has the option of inputting a 16-byte key, which I assume is meant for app-specific use (the key isn't anything cryptographically special, just the interval [0,15])
03:31:50renesacthe API should not ask, it should use the correct one
03:32:12renesacin cases where it matters of course
03:32:16SkrylarI preserved the key parameter; there are both
03:32:29Skrylaryou can do Siphash24(data, length, key) or just Siphash24(data, length) and it uses the 'default' key
03:32:33renesacfor a hash table, you don't want to waste time doing that
03:32:56renesacis the default key fixed or random?
03:33:07Skrylarfixed, same key as the reference code
03:33:47Skrylarit looks like its there in case an app wants to fiddle with their hashes
03:33:58renesacwell, for attack resistence you will want to put your key
03:34:10renesacit is there to avoid DDOS atacks
03:34:20Skrylaralso a cuckoo hash requires 2+ hashes, so i'll probably use the key field for that
03:34:23renesacthat is the whole point of siphash actually
03:35:03Skrylari was reading about cuckoos and there's one other one on wikipedia similar; they're supposed to increase utilization of the buckets pretty well
03:35:08renesacsome atacker can't generate lots of colisions unless he knows the key used in your hash
03:35:30SkrylarIn the past I used this weird two-stage tree thing for unicode, but that required allocating a 65k cell array per plane
03:35:48Skrylari figured a hash table would make a better glyph cache if the rumors about asian languages not using all 500k characters has any merit
03:36:28renesacyeah, they should use less than 3k characters normally
03:36:57renesacwell, I don't know how that translates to unicode code points, but anyway
03:37:13Skrylarjapanese and chinese at least use one CP per kanji
03:37:27renesacyeah
03:37:30Skrylarhangul has a special bag of sad
03:38:04renesachangul has a few basic parts, but I don't know how that multiplies in unicode
03:38:19Skrylarthe guys who wrote REAPER open sourced their windowing/platform kit.. might peek in there later for inspiration
03:38:29Skrylarhangul in unicode gets its own algorithm
03:38:57renesacanyway, you will probably store less than 2^31 itens, so you can split your 64bit hash in two halves
03:39:22Skrylari want to say each hangul character still gets its own codepoint but the "more optimal" way of storing it on stream is to compose it
03:39:30Skrylari may be wrong because i ignored the asian section for unicode
03:39:56renesacthat is probably right
03:40:13Skrylaralso that guy's siphash is scary
03:40:20Skrylarhe branches for every stage of the last part
03:40:29renesacI don't like cuckoo hashing much as you need at least two random jumps on memory to try to get your value
03:40:54renesacSkrylar, yeah... aparently the c compiler was smart to compile it
03:41:00Skrylari have a while loop because its one of those "well i hope the optimizer unrolls this"
03:41:09Skrylari would *prefer* to put the actual duff device in
03:41:32Skrylarmaybe i should make a forum post arguing for {.fall.}
03:41:39Skrylarthat would pretty much solve the duffing problem
03:41:42fowlSkrylar, you could always emit the loop
03:41:51Skrylari prefer not to emit things
03:41:55renesacalmost a duff device... an duff device would have a while loop inside it
03:42:06renesacthis only use the implicit fall throught
03:42:08fowlSkrylar, you will have to if you want fallthrough
03:42:25Skrylari did a workaround for the time being, still going to bother araq about a fallthrough pragma
03:42:39renesaccreate a github issue
03:42:41Skrylarpeople are going to look at us like we're dumb if we can't port a duff device without slowing the program down
03:44:12fowlreally
03:44:15renesacI don't know what he did in that post, but latter he gets one of the best performance from nimrod
03:44:33renesacafter the cast trick
03:44:37SkrylarGCC magic :\
03:44:46renesacyeah, probably
03:44:51SkrylarI tend not to like relying on 'optimizer magic' when you can't see for sure
03:45:13Skrylarone of the really old LISP references went on about how you can run (disasm 'this-func) to make sure it actually did what you hoped it would do
03:45:31renesactrue, that is one of the atractives of compiled programs vs JIT ones
03:45:49renesacpredictable performance
03:45:54Skrylaryou could have the same in a compiled IDE too
03:46:08Skrylarlook up the debug symbols and dump the asm in a special view
03:46:21Skrylari just don't know of an IDE that has thought to make it a user-friendly feature
03:47:56renesacanyway, FNV is fast for very short inputs (<8 chars), but going much bigger MMH3 and friends are faster and higher quality
03:48:51renesacand then there is sipHash that is somewhat slower but can really hide it's seed
03:48:59renesacfrom attackers
03:50:12fowlSkrylar, is there a duffs device in go or rust?
03:51:41Skrylari haven't used go in several revisions
03:55:38renesacI wonder if we can just take the final 256 bits of state from sipHash and output it like it was a 256bit hash
03:56:48renesacmaybe with a siphash-4-8 to make it a bit more higher quality, maybe...
04:05:58Skrylari'm not a cryptonerd, i coudln't answer that for you :(
04:07:14Skrylari do love templates though, at least nimrod templates
04:07:40Skrylarits so much nicer being able to just go "yeah this is how you convert ints in to pointers, now put those in the generic pointer hash function"
04:24:43*eigenlicht quit (Ping timeout: 244 seconds)
04:56:04*silven_ joined #nimrod
04:56:49*q66 quit (Quit: Leaving)
05:22:02*brson_ joined #nimrod
05:23:52*DAddYE_ joined #nimrod
05:24:22*DAddYE quit (Excess Flood)
05:24:22*runvnc quit (Excess Flood)
05:24:30*brihat1 joined #nimrod
05:24:37*brihat quit (Excess Flood)
05:24:37*silven quit (Write error: Broken pipe)
05:24:37*brson quit (Write error: Connection timed out)
05:24:51*runvnc_ joined #nimrod
05:24:51*cark quit (Excess Flood)
05:24:51*betawaffle quit (Ping timeout: 3092 seconds)
05:25:44*cark joined #nimrod
05:25:59*betawaffle joined #nimrod
05:26:05*Varriount joined #nimrod
05:45:55fowl"The empty table can be written {:}"
05:46:00fowlwhen is this useful to anyone
05:46:39*zielmicha quit (Quit: Connection closed for inactivity)
06:24:47*r0b1 quit (Quit: WeeChat 0.4.2)
06:36:11*brihat1 left #nimrod (#nimrod)
06:36:22*brihat1 joined #nimrod
06:36:56*brihat1 left #nimrod (#nimrod)
06:37:36*brihat joined #nimrod
06:38:18VarriountDemos: Pong
06:39:13Varriountfowl: Storing the health status of a player/entity in a game?
06:40:13DemosVarriount, you still need an image loading library?
06:40:37VarriountDemos: Yes.
06:40:44DemosI made a wrapper for freeimage
06:40:54VarriountCan it be used commercially?
06:40:59fowlVarriount, wut
06:41:35DemosVarriount, sure. I choose the to use freeimage under the FIPL, and my wrapper is MPL
06:41:49VarriountFIPL?
06:42:05Demosso as long as you put in a disclaimer that you are using freeimage and include the FIPL license text you can do what you want. Freeimage Public License
06:42:09DemosFreeimage is dual licenced
06:42:16Demosin face Unity3D uses it
06:42:24Demoshit up https://raw.github.com/barcharcraz/packages/master/packages.json for the package list
06:42:33Demosmy pr has not gotten into the "real" packages repo
06:42:48fowlDemos, i will merge it but are you sure you dont want to call the package assimp?
06:43:27Demosyeah you are right, maybe I should call it assimp
06:43:31Demosand freeimage
06:44:29DemosOK changed
06:44:40Varriountfowl "type Player = object of GameEntity; health: int; status: set[PlayerStatus];" "proc newPlayer(): Player = new(result); result.status = {:};"
06:45:08fowlVarriount, {:} is an empty dictionary
06:45:42VarriountOh, I misread, sorry.
06:46:01VarriountCan you even add to a "table" like that?
06:46:05fowl{"x":"y"} == [("x","y")], so {:} is an array length 0 which is not much use
06:46:38fowli doubt you can add to it
06:46:46fowlthe array is fixed length
06:46:55fowlmaybe if you do @{"k":"v"}
06:47:35VarriountAt that point, what you really need is the tables module.
06:47:56NimBotnimrod-code/packages master 0de0ba5 charlie barto [+0 ±1 -0]: added assimp wrapper
06:47:56NimBotnimrod-code/packages master 13f543c charlie barto [+0 ±1 -0]: added the nim-freeimage freeimage wrapper
06:47:56NimBotnimrod-code/packages master fc16c49 Charlie Barto [+0 ±1 -0]: Update packages.json
06:47:56NimBotnimrod-code/packages master 0e67c8c Billingsly Wetherfordshire [+0 ±1 -0]: Merge pull request #48 from barcharcraz/master... 2 more lines
06:48:00VarriountDemos: How do you code with an infected middle finger?
06:48:38DemosVarriount, what?
06:48:42fowlVarriount, its cool though because the table constructors can use the dictionary syntax
06:48:47fowl{"x": "y"}.toTable
06:49:56VarriountDemos: My middle finger hurts like the blazes when I touch anything with it.
06:50:12Demosyou should see a doctor
06:52:55VarriountHm. I hope we (the community) didn't scare filwit off.
06:57:12SkrylarDemos, Varriount: you know, SOIL is a thing too :(
06:57:51VarriountSkrylar: Does it work on Android, and opengl ES?
06:57:58DemosSkrylar, but I dont /want/ something that reads into a GL texture
06:58:10DemosI dont think it will give you immutable storage either
06:58:23SkrylarI don't have the source code memorized so I can't say much about it
06:58:40SkrylarI know that i used SOIL+stb_truetype in a program once and it made a frighteningly small runtime though
06:59:02SkrylarSOIL+stb_truetype+Lua and a little ANSI C is scary in how you can end up with a 700kb version of Renpy
06:59:03fowldevil has image altering functions in the ILU module just saying
06:59:15fowldevIL used in many commercial games just saying :p
06:59:39Demosfreeimage can load an image and do conversions to whatever pixel format you need, then give you a pointer to the data. Freeimage is maintained, unlike DevIL and SOIL
06:59:53Demosalso the unterface DevIL gives is dumb
07:00:00Demosand Freeimage is not that big
07:00:01fowldevil not maintained because its perfected
07:00:07Skrylarah pixel conversion
07:00:17Skrylari don't look forward to doing that shit when i get to GUI coding
07:00:20fowlthere is a maintained fork, ResIL, i couldnt get it to compile
07:00:20Demosfowl, then why is there a fork to maintain it
07:00:42DemosI think making a library that tries to copy the design of OpenGL is a really bad idea
07:00:58VarriountDemos: You mean, OpenAL?
07:00:58fowlDemos, why is there only one version released of this fork? devil hasnt been updated since like 2009
07:01:20SkrylarI'm not sure what designs one expects from a C library
07:01:27SkrylarIt's not like they have a wide range of patterns to choose from
07:01:29fowlmeh
07:01:39fowlcomplaining that you pass around a handle to the image instead of a pointer
07:01:41SkrylarLook at the nebulous nightmare of GObject
07:01:48*r0b1 joined #nimrod
07:02:30SkrylarI wonder if the man-hours which gobject has consumed both in people just getting it to compile + dealing with the copypasta to use it has equated to more time than just using a Better C
07:02:55Demosbut c++ sucks and is slow and sucks and sucks and is to complex and slow
07:03:06VarriountC++ is slow?
07:03:13Demossarcasm
07:03:18SkrylarVarriount: well it is to the C99 nerds :)
07:03:38SkrylarI saw a published paper that documented a C++ program wastes about 20% of its runtime on dereferencing the vtables
07:03:41Demosalso why the hell would anyone use C99, if you are in C you presumably want to run on things that are not UNIX
07:03:47*Varriount wonders if the world needs a 'sarcasm' character.
07:03:58SkrylarVarriount: :P
07:04:04DemosSkrylar, well a GObject program could do the same thing
07:04:17SkrylarSeparate statements
07:04:26Skrylarthe vtable thing is separate from the C99 nerding
07:04:39Demosand c++'s vtables are actually eaiser to optimize sometimes since you are not allowed to change them
07:04:40SkrylarThey could have, I donno, used Obj-C maybe
07:04:55SkrylarI mean they HAVE an Obj-C compiler. There's OpenStep, GNUStep, they could jank gobject in to that
07:05:16Skrylarconsidering all they would had to have done is plugged a runtime under it and they would have already had everything else
07:05:40SkrylarGObject and ANSI C is not "better" than GNU Obj-C
07:05:47fowlis there any motivation to use objc on linux
07:05:54Skrylarfowl: GNUStep
07:05:57fowlare there any kickass libraries for it
07:06:02Demosvala is the saddest thing I have ever read about
07:06:19SkrylarI was just saying they *could* have used the existing Obj-C parser and compiler, and refactored GObject on to it
07:06:37Skrylarconsidering gobject spends a great many SLOC doing the exact same damn things
07:06:42fowlyea definitely
07:06:44Skrylarwith way less readable syntax
07:06:50VarriountDemos: Genie (A python-like derivative of Vala) looks neat, but under-documented
07:07:18fowlGNUstep is a free, object-oriented, cross-platform development environment that strives for simplicity and elegance.
07:07:27fowlis it an IDE or a DE/WM?
07:07:41Skrylarits a desktop
07:07:47Skrylargnustep is an implementation of OpenStep
07:07:54SkrylarCocoa on OSX is an advancement of OpenStep
07:08:29SkrylarBut people 'hate' objc because they are being ninnies about the smalltalk syntax and how its slow if you use it poorly
07:08:30DemosVala is like "lets reinvent CFrount 20 years too late and not actually include any interesting features"
07:08:42fowlGNUstep is not... ...a desktop
07:08:45fowlfrom the website lol
07:08:46SkrylarPet peeve: when someone says objc is slow yet lives by their python interpreter -_-
07:09:22Demosmost of the slow stuff would be the GUI related dispatch, which is human limited anyways
07:09:23VarriountI have never said that objective c is slow.
07:09:40SkrylarI didn't say Varriount did, I just said it annoys me when people diss objc for reasons that are silly
07:09:56SkrylarAll though its been deemed anathema by the GNU community in general, so *shrugs*
07:10:18VarriountAnd I live with my python interpreter. It lives in my heart, and shares a bunk-bed with the nimrod compiler.
07:10:43Skrylarpython tends to be on my computer because someone else just *had* to go and use it
07:11:07Skrylari love the migraine of python 2.7.X and 3.X on the same computer and when two separate programs demand an incompatible python
07:11:42VarriountSkrylar: Thats why I have python binaries named 'python27.exe' and 'python33.exe
07:11:45Varriountin my path
07:11:55SkrylarVarriount: that doesn't help because people just write 'python' in their cmakes
07:12:24Demossomeone has got to have written a huge cmake module for dealing with this
07:12:28Skrylar"wait, you mean CEGUI wants python 3.x in the path as 'python' but zziplib wants python 2.7 to make docs and I DONT GET TO TURN THAT STEP OFF *selfstabs*"
07:13:11Skrylarlua is the happiness <3
07:13:11DemosI have actually been thinking about how we might be able to use cmake to have babel install native deps on windows
07:13:13VarriountSkrylar: I found out that CEGUI is used by a recently bought game - torchlight 2
07:13:24SkrylarVarriount: CEGUI is used by tons of stuff
07:13:36SkrylarAs is OGRE
07:13:49Skrylarogre+cegui is more or less the "i couldn't afford a game engine" crowd, lol
07:14:14VarriountSkrylar: Anyway I think objective c is disliked by the GNU community for the same reason that some people dislike C# and Java - It's seen as controlled by Apple
07:14:41SkrylarVarriount: i think they're just C weenies tbh
07:15:07SkrylarStallman is a lisper that tries to pretend C is lisp
07:16:29Skrylaranyway, meh. for the moment nimrod is pascalish enough that it makes me happy
07:17:34VarriountIt's pythonic enough (and almost as importantly, unjava-ish enough) to make me very happy.
07:17:43Demosnimrod compiles fast... I came to nimrod after getting sick of c++ and essentially saying "sure there I can use all this C code but for each library I use I need to spend 30-45mins dicking around in cmake"
07:18:09SkrylarVarriount: now we just have to shoo away the "MAKE IT MORE LIKE ..." crowd
07:18:14Demosgenerics need fixin though, I really, /really/ like eigen
07:18:41Demosor a feature where you can pass generic arguments to an importc'd c++ template
07:18:44SkrylarI sorta feel bad for filwit at the moment
07:19:08VarriountSkrylar: Yeah, but I don't wanna shoo away filwit - he's a good developer. He turned the (unfortunately awful) original nimrod sight into something that doesn't make my eyes bleed.
07:19:21Skrylarhe's not one of the 'make it more like X' people though
07:19:37Skrylarwell, i guess at times
07:19:49DemosI dont actually mind his syntax changes. I dont really care that much about the syntax
07:19:57Skrylarthe syntax proposal i don't like because removing : makes it unpascal, but his other changes require doing that or they don't make sense
07:20:27DemosI am not here for the syntax
07:20:40*Skrylar slides Demos in to a lisp compiler
07:21:14VarriountAnyone recall the url of the original nimrod website? Something like 7force.de?
07:22:47fowlyea
07:23:35Varriountfowl: I mean, the exact article. I'm trying to see if there's an archive of it anywhere.
07:23:39Varriount*url
07:23:51*xenagi quit (Remote host closed the connection)
07:24:05Skrylarthe unittest module confuses me sometimes
07:24:37Skrylari thought about trying to port VowsJS to nimrod
07:25:00Demoswell docs for unittest would be kinda nice
07:25:02DemosI like it though
07:25:05Skrylar(porting rspec is so.. expected... *goes to pun prison*)
07:25:06Demospretty much like gtest
07:25:17fowlVarriount, you can see the archive of nimrod-code.org
07:25:41SkrylarDemos: it has some bugbears in it
07:25:52SkrylarDemos: like var parameters don't get updated outside of a check statement
07:26:01SkrylarI peered in to that file and its a cobweb of macros
07:26:32DemosI expect as much, and I dont really care, as long as it works
07:26:50Demosheck gtest is a cobweb of C macros!
07:27:14Skrylari sorta question how complex does a testing lib need to be
07:27:24Skrylarthen again i also looked in the source files for unity.c and theres ghosts in there too
07:27:25fowlSkrylar, its neat huh
07:27:35VarriountSkrylar: I love opening up a library that has the potential to be a nimrod wrapper, and finding... macros. Macros, everywhere.
07:27:43fowlthe way that overlapping templates / macros work in unittest
07:27:53fowlmind boggling and awe-inspiring at the same time
07:28:15Skrylari don't care how the implementation is done until i have to open it up to fix it >:E
07:28:22Varriountfowl: You want mind boggling, try understanding lambdalifting.nim
07:28:25fowlits not broken
07:28:34fowlVarriount, yea i know
07:28:35Skrylarfowl: my github issue would disagree
07:28:39fowlthe compiler is cryptic
07:28:51fowlSkrylar, most issues are not really issues
07:29:03fowllike this one https://github.com/Araq/Nimrod/issues/984
07:29:11Varriount"It's not a bug - It's a feature!"
07:29:11Skrylarwell Araq agreed that the use-case was bug-behavior fwiw :/
07:30:16fowlwhat # is it
07:30:21Skrylarhttps://github.com/Araq/Nimrod/issues/964
07:32:00Demosyeah I can see how var vars are needed
07:32:30fowlSkrylar, ok that might be a real issue
07:32:35Demosalthoug sometimes I worry that we are getting too close to the c++ cvref qualifier zoo
07:33:20*zahary1 joined #nimrod
07:39:35VarriountDemos: As far as I see it, a 'var' type parameter is just the implicit passing of a reference.
07:40:33Demosa ptr probably, and yeah, the thing is if you return a "var" it will collapse into a non-ref
07:41:03Demosnot sure fixing it is worth is though, c++ has totally insane rules for this
07:41:24VarriountMaybe the best rule is just "use 'var' with care"?
07:41:37fowlDemos, no
07:41:57fowlvar x = returns_a_var() will make a copy yes but you can do returns_a_var() += 5
07:41:57DemosVarriount, I think vars are better than forcing people to use ptr or ref
07:42:06Demosyeah I knw
07:42:36Demosyou can also say var x = addr returns_a_var()
07:42:37VarriountDemos: But refs/ptr's are used behind the scenes.
07:42:53fowlyou can also cast a var T to/from a ptr T
07:42:55fowllul
07:43:01DemosI know, but the whole point of var is so that you can write a function without careing about how the memory is handled
07:43:05Demosalso vars are never null
07:43:08Demoswhich is nice
07:43:30fowlvar is nice for c functions like sdl_pollevent
07:43:34VarriountDemos: No. Var parameters are supposed to be used when you want to modify the parameter itself.
07:43:44Demosyeah I know
07:43:59Demosso if you want to modify a param you use var, otherwise you use the type
07:44:16Varriountfowl: Wouldn't using var parameters with C wrapped functions cause wierd issues with the GC?
07:44:19Demosand because we have var we can modify params without saying "you must be untraced or traced or whatever"
07:44:29DemosVarriount, no
07:44:35Demosbut for C functions you should use a ptr
07:44:41fowlVarriount, no, var is just a hidden ptr
07:44:47fowlDemos, i disagree
07:45:08DemosI think wrappers should be a close to the C as possible
07:45:28VarriountDemos: I don't know. Modifying/copying the opengl functions to accepts var int's and such would be highly helpful.
07:45:28Demosif you are making a higher level interface than go wild with nimrod features
07:45:41DemosI dont think so
07:45:46fowlDemos, there are c functions which would use pass-by-ref if they could (sdl_pollevent)
07:45:47Demosaddr is not hard to write
07:46:11Demosalso sometimes you do it wrong, then we have to write cast[var T](nil) and that is terrifying
07:46:26VarriountTrue...
07:46:38VarriountThough, that's more a problem with nil.
07:46:44fowlthat will result in a segfault when the value is dereferenced
07:46:56Varriountfowl: Not with opengl
07:47:08VarriountNot if it expects a pointer to NULL
07:47:30fowlif 0 is acceptable then you shouldnt use var
07:47:58Varriountfowl: Tell that to the current opengl bindings.
07:48:26Demospoint was that trying to make a C library wrapper "friendly" is just annoying
07:49:01VarriountGoodnight guys.
07:49:12fowlwhat
07:50:01fowleventually ptr T will be compatible with var T
07:51:05Demosdont like that so much, not a huge deal.
07:51:51Skrylarrenesac: you gave me the wrong hex for the offset basis earlier :(
07:52:06Skrylari fished out the right hex for it and everythings green now
07:52:37Skrylarfowl: isn't 'ptr' specifically unmanaged space?
07:52:56Skrylari thought the reason ref/ptr/var were separate is because they deal with different memory
07:53:27Demoswell ptr can point anywhere
07:53:32SkrylarDemos: i should probably write a higher level interface to GL :/ @earlier
07:53:36Demosvar can also point anywhere (except to nil)
07:53:39SkrylarWON'T THAT BE FUN <no it wont>
07:53:55DemosSkrylar, writing a higher level interface to GL is hard/not possible
07:54:11Skrylargame engines do it all the time?
07:54:34fowlSkrylar, no, you can even get var T by derefing ref/ptr T
07:55:06SkrylarDemos: the difference between GL4, GL3Core, GLES and GL2.x+Shaders is not much
07:55:16SkrylarAs far as the high level interface regarding binding geometry to objects
07:55:36Skrylarits' mostly a matter of whether you get the luxury of calling glCreateBlah or if you have to monkey around ARB versions of the same
07:56:23Demosright, but it is hard to not loose performence. And you want an alternitive to GL not an alternitive to a rendering engine
07:56:48Skrylari don't want an alternative to GL. i want an interface that hides the boring parts of GL :)
07:57:31Demosright, it may be possible, but it would be very hard
07:57:33Skrylarand with templates and distinct types, you can hide a lot of that for free
07:57:43Demostrue
07:57:45Skrylarthough you do run in to the question of "do you check glError every call?"
07:57:52Demosno
07:57:53Skrylarmost people *don't*
07:58:04fowlwhen defined(debug) broo
07:58:13Skrylarall though there are times you really *should*, like glCompileShader stuff
08:00:04Skrylari still sorta wonder if i should just wrap some winapi stuff for GUIs
08:00:11Demosyes, but glCompileShader and glLinkProgram have seperate functions to get success
08:00:14Skrylarall though writing winapis is basically walking head first in to throwaway code
08:00:34DemosSkrylar, no. Not even microsoft uses winapi for guis these days
08:00:53Skrylarthey do, its buried under mounds of MFC
08:01:02Demoswell not for WPF I think
08:01:10Demosand MFC is not updated any more
08:01:12Demosand it is terrable
08:01:16*Skrylar shoves WPF in to the corner
08:01:44Skrylarif i was going to use webcrap i'd at least use libcef or something
08:01:58Skrylaryou're wasting about as many resources touching WPF as you do with a chrome process
08:03:15Demosand wpf has more magic than web I think
08:03:22*zahary1 quit (Quit: Leaving.)
08:03:23Demosyeah I dont like wpf
08:03:32Demoscopy qt
08:04:05DemosI gotta go to bed
08:04:10*Demos quit (Quit: Leaving)
08:06:27*DAddYE_ quit (Remote host closed the connection)
08:06:55*DAddYE joined #nimrod
08:07:57SkrylarAraq, renesac: https://github.com/Skrylar/Skylight/blob/master/skylight/fnv.nim and https://github.com/Skrylar/Skylight/blob/master/skylight/siphash.nim
08:11:35*DAddYE quit (Ping timeout: 265 seconds)
08:13:05*Endy joined #nimrod
08:20:02*DAddYE joined #nimrod
08:39:08*r0b1 quit (Ping timeout: 265 seconds)
09:35:25*[1]Endy joined #nimrod
09:38:01*Endy quit (Ping timeout: 240 seconds)
09:38:01*[1]Endy is now known as Endy
09:56:35*Matthias247 joined #nimrod
10:06:07*skyfex_ quit (Quit: Computer has gone to sleep.)
10:09:57*nande quit (Remote host closed the connection)
10:27:49*DAddYE quit (Remote host closed the connection)
10:28:15*DAddYE joined #nimrod
10:32:43*DAddYE quit (Ping timeout: 265 seconds)
10:33:11*q66 joined #nimrod
10:40:20*io2 joined #nimrod
11:27:02*awestroke joined #nimrod
11:28:48*DAddYE joined #nimrod
11:29:02*silven_ is now known as silven
11:33:38*DAddYE quit (Ping timeout: 265 seconds)
12:01:54*EXetoC joined #nimrod
12:29:20*Matthias247 quit (Read error: Connection reset by peer)
13:08:40*darkf quit (Quit: Leaving)
13:16:18*awestroke quit (Ping timeout: 240 seconds)
13:18:59zaharyAraq, when tuples are matched in sigmatch, the compiler always creates an nkHiddenConv node
13:19:49zaharywhy do we do that?
13:19:49zaharyhttps://github.com/Araq/Nimrod/blob/devel/compiler/sigmatch.nim#L1107
13:19:50zaharyI have a peculiar problem that stems from the lack of the nkHiddenConv in some situations and I'm not sure how to fix it:
13:19:50zaharyhttps://gist.github.com/zah/9f925779e27ec515e4b1
13:19:55*awestroke joined #nimrod
13:20:16dom96It seems it's not possible to `from module import symbol` where `symbol` was exported in `module` from a different module.
13:46:32Araqzahary I think we can get rid of it, it is a legacy
13:46:53zaharybut do you have an idea why the VM needs it?
13:47:55NimBotAraq/Nimrod devel d5c1653 Dominik Picheta [+0 ±5 -0]: Fixes to asyncio2 on Linux.
13:48:10Araqlet me see
13:52:18*awestroke quit (Remote host closed the connection)
13:56:45Araqit doesn't work either way here
13:57:07Araqwithout the nkHiddenConv it doesn't crash, but it doesn't produce the desired output either
13:57:42Araq*with
13:59:28EXetoCit's getting hot in here
13:59:55EXetoCah yes, still compiling C++ code
14:01:18zaharywell, I have other fixes that are very related - let me push them
14:06:06NimBotAraq/Nimrod devel bf216b9 Zahary Karadjov [+1 ±8 -0]: implements higher-order inline iterators and return type inference for iterators
14:06:06NimBotAraq/Nimrod devel 3c8992a Zahary Karadjov [+0 ±3 -0]: implicit auto return type for inline iterators
14:06:06NimBotAraq/Nimrod devel 7a84d7a Zahary Karadjov [+2 ±1 -0]: fix #966... 2 more lines
14:06:06NimBotAraq/Nimrod devel 06cf888 Zahary Karadjov [+0 ±12 -0]: Merge branch 'devel' of github.com:Araq/Nimrod into devel
14:06:06NimBot2 more commits.
14:06:37zaharyI meant to say * that are not very related *
14:06:57Araqwell I have to go now
14:07:17Araqto debug the vm, I use
14:07:19Araqc.echoCode(start)
14:07:25Araqin evalConstExprAux
14:07:32Araqto see the produced bytecode
14:08:01zaharyyeah, I figured that part
14:08:13zaharyok, I'll try to see what's going on
14:08:30Araq LdArr r6, r7, r8 #system:1463
14:08:31Araq AsgnStr r9, r6, r0 #temp2:19
14:08:41zaharythe code is the same, but ldLoadGlobal loads a different value
14:08:50AraqLoads the symbol "letters" into r6
14:09:01Araqso the string assignment crashes
14:09:12Araqbbl
14:13:05*BitPuffin joined #nimrod
14:14:09*bobbybee joined #nimrod
14:15:29dom96hello bobbybee
14:15:35bobbybeehello
14:16:40dom96welcome to #nimrod :)
14:16:45bobbybeethanks
14:21:03*bobbybee quit (Ping timeout: 245 seconds)
14:26:53Araqzahary the vm codegen doesn't transform the nkExprColonExpr(key: val) to 'val' for your example
14:27:31Araqshould be easy to fix
14:29:21zaharyso far I've seen that complexAssign is used when nkHiddenConv is present, but it doesn't deal with nkExprColonExpr, so that's a little bit mysterious
14:30:16AraqnkExprColonExpr doesn't exist in the VM, the values are supposed to be canonicalized to nkPar(x, y, z) instead of nkPar(a: x, b: y, c: z)
14:31:37Araqbbl
14:33:06zaharyah, so it's actually not working in both cases - hmm, I'm almost sure I got the printouts at some point - then I drowned them in a sea of other printouts
15:06:42NimBotAraq/Nimrod devel 892b8ae Zahary Karadjov [+1 ±2 -0]: teach opcLdObj about nkExprColonExpr
15:07:18zaharynow the nkHiddenConv case doesn't work, but I'll try to look for a more general solution later
16:23:45*Endy quit (Ping timeout: 252 seconds)
16:27:26*zielmicha joined #nimrod
17:06:14*BitPuffin quit (Ping timeout: 244 seconds)
17:07:38*BitPuffin joined #nimrod
17:12:19*Endy joined #nimrod
17:28:41*OrionPK quit (Ping timeout: 252 seconds)
17:30:47*flaviu joined #nimrod
17:51:50*bobbybee joined #nimrod
17:52:27bobbybeeI feel like I'm missing something obvious, but what are the implications of osproc for cross-platform dev?
17:52:30bobbybeeMy situation is this:
17:52:47bobbybeeI wrote an app that can call "ls" on *nix, works fine
17:53:14bobbybeeMoved the code over to Windows (WINE, actually), and had it do dir instead, and boom, EOS File not found error
17:53:44*Matthias247 joined #nimrod
17:54:10bobbybeeAny ideas?
17:55:15dom96bobbybee: What function are you using to call ls/dir?
17:55:25bobbybeeexecProcess
17:56:25dom96Did you set the options param in the call or did you leave it as default?
17:57:13*Endy quit (Ping timeout: 240 seconds)
17:57:23bobbybeedefaul
17:57:26bobbybee*default
17:57:49bobbybeejust a execProcess("dir")
17:57:59dom96Then it should work. You could try using 'findExe'
17:58:12bobbybeeok, one minute
17:58:20flaviubobbybee: couldn't you use walkDir in http://nimrod-lang.org/os.html instead?
17:58:45bobbybeels/dir was just a test command,
17:58:59bobbybeein practice it's getting commands on the fly
17:59:10dom96You may also try execCmdEx
18:00:08bobbybeetuples are accessed as [0]?
18:00:26dom96yes, or by field name
18:02:29*princessao joined #nimrod
18:02:55bobbybeeHuh.
18:03:00bobbybeeI get the error either way,
18:03:08bobbybeehowever if I use cmd /c dir, it works fine
18:04:57*princessao quit (Remote host closed the connection)
18:05:45bobbybeevery possibly a bug in nimrod's implementation itself, though I can't be certain
18:12:18*bobbybee quit (Ping timeout: 245 seconds)
18:12:24dom96It's possible. There have been some changes to osproc recently
18:25:29*noam quit (Ping timeout: 241 seconds)
18:35:06*Demos joined #nimrod
18:35:32*noam joined #nimrod
18:37:42DemosYAY! more static[T] fixes. Thanks zah!
18:39:27*BitPuffin quit (Ping timeout: 265 seconds)
18:45:05*Endy joined #nimrod
18:57:55*kenjetaev quit (K-Lined)
19:05:23NimBotAraq/Nimrod devel 61d0452 Zahary Karadjov [+0 ±1 -0]: fix #949
19:05:23NimBotAraq/Nimrod devel 3a7eb7a Zahary Karadjov [+0 ±1 -0]: fix #829; (macros.quote)... 6 more lines
19:05:25VarriountDemos: What does static[T] do again?
19:06:05Demoscompile time constant params
19:06:14Demosright now only params, not generic params
19:06:21Demoswhich is what I really want them for tbh
19:06:36flaviuI wonder if they would work in a loop
19:06:43VarriountSo, they ensure that parameters are known at compile time?
19:07:19zaharyyes, the compiler tries to evaluate the param if it manages to do so, the overload is considered
19:07:50zaharythe the evaluated value can be read statically in generics and in marcos
19:08:01fowlis there a way to get a count of global variables (besides hand counting them)
19:08:10flaviuSo it would allow for simple static checking. Sounds really useful
19:08:24fowli want to see how many globals using entitty creates, its at least one per component and one per message
19:08:34zaharyfowl, you mean by using some standard API or by modifying temporary the compiler?
19:10:01fowlwhichever is easier i guess, probably not worth the work to modify the compiler
19:11:13*BitPuffin joined #nimrod
19:12:38zaharyif you are debugging something, you can add a single line to cgstmts.getSingleVar - this should catch all globals I think
19:12:49zaharygenSingleVar
19:15:36*psquid_ joined #nimrod
19:16:25*BitPuffin quit (Ping timeout: 240 seconds)
19:16:25*psquid quit (Ping timeout: 240 seconds)
19:20:01VarriountI thought the number of globals was set at compile time..
19:24:56*r0b1 joined #nimrod
19:39:09fowlVarriount, the globals are in generics that get instantiated
19:39:17fowlzahary, tyu
19:51:06zaharyfowl: if you know which function is creating the globals, another technique is to just add static: echo statements inside it - they will be executed once for each instantion
19:51:11*skyfex joined #nimrod
19:52:29skyfexIf I have a C function that give me an array in the form "some_struct **foo", how do I access the elements of that array in Nimrod?
19:53:23zaharytry casting the some_struct* to a very large nimrod array
19:54:13zaharyalso, see the unchecked pragma that Araq added a few days ago
19:54:52*nande joined #nimrod
19:55:40fowlzahary, im going to test using openarray[T] for c functions that take (T*, int) (or the other way around, i have to check what it compiels to again)
19:59:29*Endy quit (Ping timeout: 240 seconds)
20:01:45*mangat joined #nimrod
20:10:24Demoscast it to a ptr array[0..50000, ptr TFoo]
20:13:38Araqdom96: 'dir' is builtin and so cannot be executed with osproc
20:13:54Araqhe should exec a real program not a shell builtin
20:14:05fowlisnt there an execshell()
20:14:31Araqtrue but I'm not sure even that is guaranteed to work
20:14:50Araqand it's not like 'dir' cannot be expressed with os.nim
20:15:31NimBotAraq/Nimrod devel 6b8cbc3 Zahary Karadjov [+1 ±2 -0]: fix #909
20:16:44zaharytoday, I avarage 1.6 lines per fix :)
20:19:53Araqperhaps I should review your changes :P
20:21:59Araqbtw I now think we should copy C++ when it comes to overload resolution as the current implementation is essentially not spec-able
20:22:21Araqand a more declarative approach would help, I think
20:22:47zaharythe plan is to try the subset rules we discussed recently
20:23:13Araqthat is C++'s approach, right?
20:23:40zaharyyes, although they don't have our tyOr or tyAnd types
20:23:41*Endy joined #nimrod
20:24:11fowlt1 and t2? what does that do
20:24:37zaharywhere are you looking, fowl?
20:25:20fowli inferred it from "tyAnd"
20:25:45Araqzahary you should compile "niminst" btw. It takes like 2 minutes because the source code filters produce long lists of & operations
20:26:01zaharytype Foo = Synchronized and Serializable
20:26:18zaharytype Bar = int or string # also (int | string)
20:26:42fowlo
20:27:14Demosthose just define typeclasses though right?
20:27:44EXetoCyup but they aren't user-defined :p
20:29:28Demosand with overloading you would want the most specific match right?
20:30:56zaharyyes - probably there will be some pain due to new ambiguities tho - I'm not sure how to treat our "closest scope" rule
20:36:56Araqthe "closest scope rule" is adhoc and I think its "precedence" is downright wrong
20:37:31Araqbut it's definitely hard to nail how this should work
20:37:47zaharyI think it's useful - my current thinking is towards some pragma that lets you pick your overriding model
20:38:08AraqI never said it's not useful
20:38:55Araqand no, please don't add pragmas to influence overloading resolution
20:39:04zaharyif you say "I want to override everything" for some inner proc, it will be matched even if it's less specific
20:39:50Araqyeah but I can also come up with a unique name instead and use that
20:41:38*Endy quit (Ping timeout: 240 seconds)
20:41:38zaharywell, we'll see - maybe this should be added only on a proven-need basis
20:42:16skyfexIs it possible to specify the storage type of an enum?
20:42:33skyfexThat is, I have a uint8 which is actually an enum
20:43:07Araqtype MyEnum {.size: 1.} = enum ...
20:43:23Araqbut nimrod picks the smallest reasonable size for your enum anyway
20:43:32Araqso it will use uint8 already
20:44:39Demosdear god my test opengl app is clocking in at 9MB
20:45:07fowl/ban Demos no rust/go in here thx
20:46:12Demosif I compile it with just nimrod c mayapp.nim I get like a 500k app that will only run from my msys2 shell (because DLLs you see), if I compile with a bunch of flags for a full static link it works, but is large
20:46:40fowldont the dlls work if you put them in the app dir
20:47:00Demosyeah but that defeats the point
20:47:16fowlhow? you're on windows
20:47:22fowlits common to ship dll with the binary
20:47:30Demosmaybe, but it is stupid imo
20:47:44fowlbeats having different versions of stuff fighting on your FS
20:47:59Demosdoes not beat just having everything static linked
20:48:19fowlis it quicker that way or something
20:49:18skyfexBug(?): destructors are not called on variables defined in a top-level statements
20:49:38fowlskyfex, those are global vars
20:49:40Araqskyfex: known issue but *when* should they be invoked?
20:50:32skyfexAraq: When the app closes? Doesn't that make sense?
20:50:57Araqthat's nasty to implement and mostly code bloat
20:51:11*Mat3 joined #nimrod
20:51:12Araqthe OS shuts down your file handles anyway
20:51:15skyfexAlright, I can see it's not important, I just found it curious
20:51:18Mat3hello
20:51:50skyfexwhat about... for x in someProc: ... where someProc returns an object with a destructor.. I get:
20:51:58skyfexcardreader.nim(10, 16) Error: usage of a type with a destructor in a non destructible context
20:52:27Araqthat looks like an oversight of mine
20:52:40Demosfowl, it is smaller that way, you can strip the exec
20:53:31Demosoh fucker I need to call a freeimage function only if I am static linking freeimage, is there any way to detect if I am static linking something
20:53:54fowlidgw you hate dynamic linking, it makes sense to ship your product with the version libraries it needs
20:54:38fowlDemos, use -d:staticlinkfreeimage to decide to static link
20:54:46Demosyeah that is what I was thinking
20:58:18*flaviu quit (Read error: Connection reset by peer)
20:58:43*flaviu joined #nimrod
21:04:03*Endy joined #nimrod
21:04:35DemosI bet I could reduce the executable size by linking microsoft's c++ standard library instead of libstdc++, but I would have to recompile assimp
21:13:01skyfexIf I don't make a type (an object) public, does that mean it can't be copied?
21:13:14Araqno
21:13:57skyfexI'm creating an interface to libusb, and there's a function to get a list of devices, and the library wants me to call a free function on the list when I'm done with it
21:14:18skyfexI was thinking of putting it in a destructor..
21:15:33skyfexbut if the object I've wrapped the list pointer in gets copied, it will be trouble
21:15:38Demosplease do not do that, make a wrapper of the C library that is as close to the C as it can be then use that to make a more nimrodic interface for people to use
21:15:54skyfexI'm doing that..
21:16:16skyfexCurrently in the same file, but I can split it
21:16:25Demosallright
21:16:26fowlskyfex, make that function private and wrap it to give you a seq
21:17:06fowlwhat demos said
21:18:05Araqskyfex: I'm not sure what your problem is really, overloading of '=' is planned and with the .error pragma you can then disable '=' for certain types
21:19:19skyfexAraq: Hmm.. yeah, I think fowl is onto something better anyway.. just put all the contents in a seq, and free the list immediately
21:22:18skyfexBut I also need to free the content of the list (it contains device references) when I'm done with them.. If I wrap the pointer in a ref object, can I free the content of the pointer when the wrapper object is garbage collected somehow?
21:23:47Mat3ciao
21:23:50*Mat3 quit (Quit: Verlassend)
21:26:19fowlskyfex, http://build.nimrod-lang.org/docs/system.html#144
21:26:55skyfexfowl: Ah, right, thanks!
21:36:12*filwit joined #nimrod
21:37:44Araqhi filwit
21:38:05filwithey quick question, how do i get the underlining T of a ref object?
21:38:09filwithi Araq
21:38:24Araqtype(foo[]) should work
21:38:57NimBotAraq/Nimrod devel 9f6f739 Zahary Karadjov [+0 ±5 -0]: fix #866; generic static params
21:40:30filwitjust to be clear, that's the same as... type PFoo = TFoo; TFoo = object ... ; var a:TFoo; var b:type(PFoo) # a and b are same type
21:41:11Araqwith zahary's recent changes type(PFoo[]) might produce TFoo
21:41:20filwitfor some reason i thought this would just give a type description.. and that would be PFoo
21:41:41Araqnote the [] dereference
21:41:51filwitah, right i see
21:41:58fowlsweet
21:42:03zaharyhmm, why my recent changes - it should have always worked like that
21:42:27Araqzahary [] used to require an lvalue
21:42:40Araqand couldn't deal with types
21:42:44zaharyah, that's a type here, I see
21:43:16zaharyso what have I changed exactly?
21:44:22filwitfowl: btw, your Assimp lib needed a little touchup, but it's work good with Collada files. Still need to make sure Blender exports Collada with multi-uvs (as Assimp doesn't seem to like .blend files), but I'm hopeful it'll work. So thanks for the wrapper man
21:45:15fowlfilwit, demos moved it to a new repository
21:45:17Demosit is actually fowl's wrapper, I just split it into its own repo and fixed some bugs
21:46:05DemosOMGOMGOMGOMGOMG! #886 was fixed it is like christmas and zahary is santa!
21:46:47fowlwe should get notifications about closed issues
21:46:48filwitDemo, fowl: i just copied it for the moment. Will look at using y'alls actually wrapper later on
21:47:08zahary:) well, go try it our Demos - I wouldn't be surprised if you find another issue
21:48:15fowlfilwit, i also moved sdl2 to its own repos and im going to fix the type names (Window for PWindow, there is no TWindow anyways)
21:50:29filwitfowl: yeah i plan on using that as well, probably before I release code
21:50:43filwitfowl: for the moment I'm just keeping my own things so i can work out any problems i run into
21:51:24fowlgood idea, github doesnt have any features to promote collaboration
21:51:38fowld;
21:53:50*Endy quit (Read error: Operation timed out)
21:56:54runvnc_excuse me, how can I de-reference a reference? I need to get a TServer from a PAsyncHTTPServer
21:57:54fowlderef is postfix []
21:58:20runvnc_thanks
22:04:04fowlah filwit Demos Varriount Skrylar I also have a freetype GL wrapper that I totally forgot about, that will def save you some steps if youre using fonts with gl
22:04:30filwitfowl: thanks again
22:06:27fowlnp
22:07:58*askatasuna quit (Ping timeout: 264 seconds)
22:11:04*brson_ quit (Ping timeout: 244 seconds)
22:15:06Demosjust freetype or freetype with gl?
22:15:33fowlwith gl, sf.net/projects/ftgl
22:15:56Demosfilwit, what kind of touchup do I need?
22:17:09filwitDemos: i can't remember off the top of my head sorry, and busy at the moment. May have been just a lib-linking issue on Arch, can't remember. I'll get back to you.
22:36:32NimBotAraq/Nimrod devel 8485d32 Zahary Karadjov [+0 ±4 -0]: further improvements for static generic params; activate the hardest test cases
22:36:58zaharyOk, Demos, now I challenge you the break the implementation :P
22:40:07Demosnope
22:40:51Demosthethe bug I opened (#986) still happens
22:44:25zaharyah, ok, I haven't tried to implement that part yet - it should be easy
22:45:32Araqzahary whatever it is that you're taking, don't stop ;-)
22:48:09*skyfex quit (Quit: Computer has gone to sleep.)
22:49:21VarriountAraq: Is there anything else that needs to be done with testament?
23:08:33AraqVarriount: I can't say until dom96 updated nimbuild
23:09:03VarriountAraq: Anything you want me to do in the meantime?
23:09:23flaviuI'm curious what implementation restriction prevents thread var initialization?
23:12:38Araqzahary: https://gist.github.com/anonymous/28fe2338e413b8962b43
23:13:06Araqbut the tasynciossl test seems to flatter
23:13:42Araq*flutter
23:14:02VarriountAraq: Is that test diff from the Windows builders?
23:14:45zaharyhmm, but I just tested these very tests
23:15:10*OrionPK joined #nimrod
23:18:33AraqVarriount, zahary indeed only the windows builders report that
23:19:12VarriountAraq: The asynciossl tests are always dodgy - I've never been able to pinpoint why.
23:19:29Araqflaviu: var s {.threadvar.}: seq[int] = @[] # needs to inject thread creation so that every thread gets a fresh @[]
23:19:54Araqthis is not impossible to implement but we've better things to do
23:20:33Araqand it's not even obvious to me people enjoy the resulting slightly slower thread creation and code bloat
23:23:36VarriountAraq, zahary: All those tests succeed on my personal build (updated about 5 minutes ago)
23:23:57zaharythe windows tester have lied to me before
23:24:17VarriountAny idea as to what could have caused the tests to falsely fail?
23:25:10zaharyI suspect something in the tester fails, not the compiler
23:25:21AraqI still think the windows testers are 1 commit behind
23:25:33VarriountI'll restart them then.4
23:25:35Araqfor some reason
23:29:20VarriountAraq: Part of the reason that the tasynciossl test fails on my machine is that occasionally, windows will block it from using the network because the test executable is 'suspicious', and if I
23:29:39VarriountI'm not around to let the exectutable run correctly, it fails.
23:29:46renesachttps://github.com/Araq/Nimrod/issues/984 <-- added a comment
23:30:08VarriountSorry for the bad typing, one of my fingers is bandaged.
23:33:41Araqzielmicha: "dlopen cannot resolve linker scripts, which are used on some Linux distros (for example, Gentoo) as an alternative to symlinks. dlopen caller is expected to provide path with full library"
23:33:49Araqare we really supposed to fix that?
23:34:43Demossince you are on gentoo you could go --dynlibOverride:foo and use passl to tell the linker wtf to do
23:34:54Demosyou are compileing yourself
23:35:20Araqif Gentoo isn't interested in a working OS, how is that our problem?
23:35:46DemosI would actually love for there to be a library that deals with all these linking issues, but I suspect it is a huge rabbit hole
23:36:03OrionPKfriggin comcast
23:41:49VarriountAraq: I thought you hated symlinks :p
23:42:27VarriountOrionPK: Added private messaging to ircFamilier yet?
23:42:35OrionPKno, sorry
23:42:54OrionPKbut like I told dom, I'm going to be switching from a built in web server to SCGI
23:43:05OrionPKnegating many of the issues it was having w/ the default std lib
23:43:12OrionPKand then open sourcing it
23:43:24Demoswhat is the max number of elements I can put in a set, I have an enum with like 200 items in it...
23:43:28OrionPKso you'll be able to contribute to it (hopefully you'll want to :))
23:43:38AraqDemos: the limit is 65K iirc
23:43:47Demosthat will work just fine
23:43:49OrionPKI havent had any time though, bought a house a week or so ago
23:43:54Demosand are all seqs the same size?
23:44:14Demossorry sets not seqs
23:44:19Araqno
23:46:26*brson joined #nimrod
23:46:33*filwit quit (Quit: Leaving)
23:47:43Araqgood night
23:49:08VarriountGood night.
23:52:10Demosif I want to be able to store a bunch of sets of different sorts of things in a seq should I use ref sets or TSets?
23:54:08Demoswait never mind
23:55:43*DAddYE joined #nimrod
23:57:20NimBotAraq/Nimrod devel e7e40e0 Zahary Karadjov [+0 ±3 -0]: fix #986
23:57:44*io2 quit ()