<< 09-04-2017 >>

00:03:49FromGitter<Varriount> zachcarter: You have a use for it?
00:04:13zachcarternot at the moment, but maybe when / if I ever get back to that Nim spine runtime
00:04:35zachcarterI have a tough time getting motivated to write that runtime though, since the bindings to the C runtime work
00:04:47FromGitter<Varriount> But the C runtime has a really odd license.
00:04:52zachcarterand I have a billion other things I could do
00:04:52zachcartertrue
00:05:09zachcarterI spoke with someone a little more knowledgeable about that licensing situation than I did
00:05:18zachcartererr than I am
00:05:52zachcarterhe said not to be too concerned about having to include the spine runtime license, because anyone that uses the product should already own a copy of it / have a copy of the license
00:06:59zachcartereither way I’m making support for spine totally optional in frag so it’s ultimately up to the user as to whether they want it or not
00:07:16zachcarterI’m probably not going to be using spine much - I don’t have any artist friends that can produce art for it for me
00:09:07*chinchilla joined #nim
00:12:23FromGitter<Varriount> I can do vector art, not sure how good I would be at video game art though.
00:19:02*Matthias247 quit (Quit: Matthias247)
00:19:10zachcarterooo
00:19:20zachcarterwell spine is basically made for vector art
00:19:31zachcarternot sure how much you like making art ;P
00:21:00zachcarterspine does seem pretty powerful though
00:23:11*PMunch quit (Quit: leaving)
00:25:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:27:47FromGitter<Varriount> It would probably take practice to "get up to speed" with regards to game art.
00:28:19FromGitter<Varriount> Although, the thing with Spine is that you only need it if your graphics are at a certain level of complexity.
00:30:09zachcarteryeah
00:30:23zachcarterand I imagine with the 3/4 perspective I’m going for, spine isn’t going to buy me much / if anything
00:30:58zachcarterI dunno art is something I always dance around and never have a good answer to
00:31:59zachcarterhttps://media.giphy.com/media/3oz8xBhVpOvJPuB37G/giphy.gif
00:32:12zachcarterthat’s the art I was producing for my last attempt at my game
00:35:02FromGitter<Varriount> It all depends on the style you're going for.
00:35:30FromGitter<Varriount> I'm more familier with adventure-game style art, especially the low-res style
00:35:34*cjbayliss joined #nim
00:35:56*cjbayliss left #nim (#nim)
00:36:14FromGitter<Varriount> zacharycarter: Like this - http://www.wadjeteyegames.com/games/blackwell-epiphany/
00:46:57zachcarterVarriount: ah yeah spine would work great for something like that
00:51:02FromGitter<Varriount> zachcarter: No slight intended, but I *love* adventure games.
00:51:13zachcarter:D
00:51:26zachcarterI haven’t played any in a while but I do remember liking them a lot back in the day
00:51:43FromGitter<Varriount> I played a bunch of adventure games targeted at children growing up.
00:52:03zachcarteryeah, they even make good ones for adults too
00:52:28FromGitter<Varriount> https://en.wikipedia.org/wiki/Putt-Putt_(series)
00:52:34FromGitter<Varriount> :3
00:52:51zachcarterahaha
00:52:54zachcarternever heard of this
00:53:10zachcarterbut yeah I remember playing so many adventure games growing up
00:53:42zachcarterI guess lately roguelikes have just grabbed my attention because of all the proc gen
00:54:09*nsf quit (Quit: WeeChat 1.7)
00:57:07zachcarterspeaking of procgen, I’m close to being finished porting the logic of my ship blueprint generator from Java to Nim
00:57:18FromGitter<Varriount> zachcarter: If you need someone to compose music, I recommend this guy: https://virt.bandcamp.com/music
00:57:32FromGitter<Varriount> Although, considering the work he's done so far, I doubt he's cheap.
00:57:54zachcarteryeah
00:58:00zachcarterhe’s good though
00:58:03zachcarterlistening now
00:58:09zachcartercan crank out some midis haha
00:58:19FromGitter<Varriount> https://virt.bandcamp.com/album/cat-girl-without-salad-amuse-bouche-extra-crispy-or-original-soundtrack
00:58:55zachcarterdamn yeah he’s good
01:03:52*libman joined #nim
01:11:01*bjz joined #nim
01:31:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:36:11*arnetheduck joined #nim
02:02:14*chemist69 quit (Ping timeout: 246 seconds)
02:14:43*chemist69 joined #nim
02:35:19zachcarterHoping someone can help me with this pretty simple question
02:35:41zachcarterI have some iteration logic I need to move into a template or something - I’m not sure what the best way to do this is
02:35:42zachcarterhttps://gist.github.com/zacharycarter/34aaa1bd5e2877d3ab4f3ad22d0e4d01#file-how_to_repeat-nim-L2-L27
02:35:55zachcarterI essentially need to make that check repeatable
02:36:05zachcarterand then the code beneath it will change depending on the proc called
02:39:09zachcarternevermind figured it out
02:39:16zachcarterdiscovered iterators :P
02:45:35*Yuken_ quit (Read error: Connection reset by peer)
02:50:31*bjz joined #nim
02:55:22*gangstacat joined #nim
03:29:50*def-pri-pub quit (Quit: leaving)
03:59:27*dexterk joined #nim
04:20:32ldleworktemplate `as` (a, b: untyped): untyped = ((b)a)
04:28:18zachcartersweet!
04:28:23ldleworkhehe
04:28:27zachcartermy spaceship blueprint generator is working
04:28:37zachcarterwell that template is cool too haha
04:28:44ldleworkoh :)
04:28:50zachcarterhttp://imgur.com/a/piPCz
04:29:01zachcarterI guess I should fill that up with more images
04:29:06ldleworkusing cellular automata?
04:29:32ldleworkI know the game of life when I see it
04:29:54zachcarternope
04:30:19ldleworkya right
04:30:47zachcarterhttp://davebollinger.org/works/pixelspaceships/
04:31:01zachcarterit’s essentially CA
04:31:19zachcarterflipping cells on off
04:31:29zachcarterbut it’s not really random
04:31:49zachcarterI guess it’s just a specific ruleset
04:32:16zachcarterI don’t know, I just know I didn’t approach the problem by using CA I just kind of used that algorithm he proposes in that paper
04:32:29ldleworkwhat paper?
04:32:37zachcarteror article rather
04:32:53ldleworkI don't even really see an algorithm described here..
04:32:56zachcarterblog post
04:33:45zachcarterI guess he’s just describing a CA ruleset
04:33:58ldleworklike i said, I know it when I see it :D
04:34:03zachcarterhaha yeah
04:34:19ldleworkzachcarter: have you ever read A New Kind of Science?
04:34:27zachcarternope
04:34:36ldleworkits brilliant
04:34:46zachcarterI’ll check it out
04:34:52ldleworkand available for free online, http://www.wolframscience.com/nksonline/toc.html
04:35:03ldleworkbut it looks much cooler on my bookshelf :)
04:35:11zachcarterhahaha
04:35:14zachcarterthey always do
04:35:18ldleworkthough its currently out on trade for my co-worker's copy of GEB
04:36:15zachcarterspeaking of which i need to get a C book back from a co-worker
04:37:19ldleworkzachcarter: you should make your spaceship generator a separate library
04:37:29zachcarterI will
04:37:36zachcarterwell it’s going to be a part of my game
04:37:44zachcarterbut if someone else wants to use it they can
04:37:49zachcarterit does much more than this though
04:37:57ldleworkwhat does
04:38:02zachcarterthe generator
04:38:07ldleworkin what sense
04:38:25zachcarterwell this is just a blueprint for a spaceship, I then interpret this bitmap image and generate an actual map from it with corridors and rooms
04:38:45ldleworkOh sure
04:38:46zachcarterand then I also generate lock and key puzzles for that layout
04:38:49ldleworkI thought maybe you meant the CA bit
04:38:57zachcarterah yeah, I can put that out there too
04:39:19zachcarterthe code is up right now actually
04:39:30ldleworkzachcarter: are you making a no man's sky roguelike
04:40:22zachcarterI haven’t really played NMS
04:40:24zachcarterso I’m not sure haha
04:40:33ldleworkcertainly you know what it is
04:40:36zachcarterI guess it has similiarities in that you’re exploring procedurally crafted universes
04:40:37zachcartersure
04:40:49zachcarterbut I don’t plan to focus on the same areas of gameplay they did
04:40:58ldleworkwell its a roguelike so I'd hope not
04:41:05zachcarteryeah exactly
04:41:33zachcarteryou said you were working on a roguelike as well?
04:41:53ldleworkyeah
04:42:10zachcarterDDA clone
04:42:12ldleworkInspired by cataclysm, but with less focus on sci-fi disaster and more on naturalism
04:42:14zachcarteroh
04:42:17zachcarterthat’s right
04:42:25ldleworkwith some magical realism
04:42:43zachcarterI read that article last night
04:42:44ldleworkbasically you will get stronger as ou age
04:42:52ldleworkuntil you are getting weaker with age
04:42:59ldleworkeventually you will die from something
04:43:36zachcarterare you going to do any kind of legacy system?
04:44:07ldleworkhaven't thought that far ahead really
04:44:17ldleworkI'm mostly thinking about data structures and stuff
04:44:21zachcarterright
04:44:23ldleworkI want everything defined by data
04:44:48ldleworkI mean as much as makes sense to do so
04:45:01ldleworkBut cataclysm is highly driven through json content rather than new code
04:45:06ldleworkI wanna try to achieve that
04:45:18ldleworkbut with super factored nim code
04:45:21ldlework:P
04:45:24zachcarter:)
04:45:36ldleworkIt seems like we're working on a lot of the same stuff
04:46:00zachcarteryeah, definitely
04:46:34ldleworkYou make me want to build an 1D automata explorer example for Dadren
04:46:37zachcarterNim is a good language for game programming and especially data heavy games I think
04:46:44zachcarter:D
04:46:44ldleworkYou should really give A New Kind of Science a go
04:46:51ldleworkIts a brilliant book
04:46:57zachcarterI just read a few pages of the intro it definitely has my attention
04:47:08ldleworkIt really confirmed my materialism
04:47:42ldleworkI really wanna spoil the last few chapters but I wont
04:47:51ldleworkthough its a huge book, if you don't end up reading it, tell me and I'll spoil it
04:47:58zachcarterhaha okay :D
04:49:32ldleworkMy top 4 non-fiction books to change your life are: Stephen Wolfram's _A New Kind of Science_, Jeff Hawkin's _On Intelligence_, Michael Graziano's _The Social Brain_ and Sam Harris' _Free Will_
04:50:36zachcarterI don’t read enough :/
04:50:44zachcarteror I read too much nonsense I suppose
04:51:29ldleworkI've been reading like crazy
04:51:30ldleworkI don't know why, its like a fever
04:51:32ldleworkIf you want a tiny small book (took me 2 hours to read) to get you back in the mood
04:51:33ldleworkto entice your brain back to the value of books without a huge investment
04:51:40ldleworkThe Divine Farce is 10 bucks on amazon and incredibly jam packed with philosophical implications
04:52:31libman3 of those 4 are on That Swedish Site. 2 also as audio. ;-)
04:52:43zachcarterhuh sounds interesting, just reading the synopsis
04:52:50ldleworkIts a simple allegory, akin to Dante's The Divine Comedy, but shorter and with simple language
04:52:51ldlework"Three strangers are condemned to live together in darkness, crushed together in a concrete stall so small that they can never sit down. Liquid food drips down from above. Waste drains through a grid on the floor. So begins one of the strangest, most surreal comments on the human experience, on love and hatred and the human ability to find good in any situation, no matter how difficult. "
04:52:55zachcarterright
04:53:02ldleworkI think this book can really help one appreciate what they should do in life
04:53:46*libman reads too much, and writes too little.
04:55:01ldleworklibman: all of sam harris' books should be listened to imo
04:55:52ldleworkgreat orator
04:56:28ldleworkI try to audiobook when possible. Before sleep in bed, with a sleep timer, and the speed kicked up to about 1.33x :)
04:56:46ldleworkyou'd be surprised how many books you can go through that way
04:56:58ldleworkand how clearly you can recieve an author's message when it is the only content of your consciousness
04:58:29libmanI've gotten prothletising atheism out of my system when I was 12.
04:58:57ldleworkNone of his books are about athesism in so much that they take it as a premise.
04:59:07ldleworkBesides maybe one book, the end of faith.
04:59:09ldleworkThat's it.
04:59:29ldleworkHis other books are about mindfulness, spirtuality, and secular ethics.
04:59:57ldleworkHaving granted him a material universe, since that's the one he takes and orients his frameworks for thinking.
05:00:58libmanI don't need ethics lessons from apologists for The Almighty Gov.
05:01:28ldleworkokie dokie
05:04:25ldleworklibman: Jan Helfeld is probably more your bag :)
05:04:44ldleworkwho is like a superhero who's power is the socratic metho
05:04:47ldleworkd
05:05:04ldleworkhttps://www.youtube.com/watch?v=tBIKP4W50-I
05:06:05libmanYup, now there's a rational skeptic. But all this is off-topic for this channel.
05:07:04libmanExcept Wolfram. He's always on topic.
05:52:52*zachcarter quit (Quit: zachcarter)
06:07:07*yglukhov joined #nim
06:17:47*Nobabs27 quit (Quit: Leaving)
06:30:59ldleworkVarriount, I have a new challenge if you're interested
06:31:35FromGitter<Varriount> Oh?
06:32:11*vlad1777d joined #nim
06:36:02ldleworkya one second
06:37:20ldleworkVarriount, https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim
06:37:31ldleworktry to change BSPNode.parent to a ParentNode
06:38:16ldlework(as to avoid casting elsewhere)
06:41:27FromGitter<Varriount> Apparently one of my dogs doesn't mind having a laptop on top of her
06:43:58ldleworkhehe
06:48:55ldleworkVarriount do you understand the problem?
06:49:58FromGitter<Varriount> How should I build this?
06:50:35ldleworkVarriount, from inside examples/bsp2/ do cd ../../ && nimble install -y; cd examples/bsp2 && make run
06:52:04FromGitter<Varriount> I think the example just crashed the graphics driver
06:53:19ldleworkwhat
06:54:42FromGitter<Varriount> I ran it, and my screen went black
06:55:37FromGitter<Varriount> And unlike Windows, OSX doesn't attempt to restart the display driver. :X
06:56:20ldleworkI dunno why it would do that
06:59:34Araqto refute materialism all you need to do is to cut your finger, but that's offtopic
07:02:20FromGitter<Varriount> I'm not getting any problem.
07:05:25FromGitter<Varriount> ldlework: By the way, your makefile refuses to run on OSX
07:07:00FromGitter<Varriount> It doesn't create the "bin" directory.
07:08:32FromGitter<Varriount> ldlework: ?
07:09:27Araqhttp://physics.stackexchange.com/questions/19647/can-cellular-automata-be-reconcilied-with-quantum-mechanics there, it doesn't work, I saved you the time, you don't need to read the book ;-)
07:12:10FromGitter<Varriount> ldlework: By the way, you might find a performance increase if you use a sequence base allocation scheme for all the nodes, instead of using references. You'll get better locality of reference.
07:13:18ldleworkVarriount will that sacrifice readability?
07:13:26ldleworkVarriount, were you able to run the example?
07:14:27FromGitter<Varriount> ldlework: I was able to run the example, even after changing `BSPNode.parent` to type `ParentNode[T]`
07:14:36ldleworkwat
07:15:04ldlework/home/dlacewell/.nimble/pkgs/dadren-0.1.0/dadren/bsp.nim(31, 9) Error: attempting to call undeclared routine: 'parent='
07:15:20ldleworkas soon as I change to: parent*: ParentNode[T]
07:15:23FromGitter<Varriount> did you forget to commit some changes to the repo?
07:15:47ldleworkno
07:16:03ldleworkVarriount, are you using master?
07:21:09FromGitter<Varriount> Oh wait, stale installation
07:21:29FromGitter<Varriount> I just ended up using 'nim c --run --path:../../`
07:21:53FromGitter<Varriount> I get "Error: inheritance only works with non-final objects"
07:23:49ldleworkVarriount, you're on eb2c25ae0aaac251960efc6d2d00fd435fe515d9 ?
07:24:04ldlework"Change newSibling back to method to clean up split"
07:24:06ldlework?
07:25:01FromGitter<Varriount> Yes.
07:25:23ldleworkdunno why we get different errors
07:26:30ldleworkVarriount what version of Nim do you use?
07:26:37ldlework0.16 or devel?
07:27:55FromGitter<Varriount> I haven't added any conversions/casts. It's choking at line 30, because a value of type `Leaf[T` is being assigned to a value of type `ParentNode[T]`
07:28:17FromGitter<Varriount> Why do you need that change anyway?
07:28:40ldleworkVarriount, line 30 https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim#L30
07:28:56ldleworkhow is this assigning a Leaf[T] to a ParentNode[T]?
07:29:08ldleworkVarriount, the change is "needed" because that's the correct expression of the program.
07:29:19ldleworkOnly ParentNode[T] should ever be assigned as a parent
07:29:25ldleworkif a Leaf[T] was ever assigned it would be broken
07:29:52ldleworkRight now I have to cast from BSPNode[T] to ParentNode[T] anytime I access it
07:30:14ldleworkhere: https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim#L134
07:30:24ldleworkhere: https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim#L160
07:30:31ldleworkhere: https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim#L172
07:30:39ldleworkhere: https://github.com/dustinlacewell/dadren/blob/master/dadren/bsp.nim#L177
07:33:49*yglukhov quit (Remote host closed the connection)
07:33:51FromGitter<Varriount> You could have just told me the line numbers.
07:35:01ldleworkwe aint paying by the byte, thought it was a convenience
07:39:00FromGitter<Varriount> Well, I keep getting this: https://gist.github.com/Varriount/d1827ffa7b98bb4121eb76a5c7ef49bf
07:40:25FromGitter<Varriount> @Araq Any idea why we would be getting the above error with generics? all of them inherit
07:40:27ldleworkVarriount, what version of nim do you use?
07:40:53*ngc quit (Quit: Leaving)
07:43:24ldleworkVarriount, upgrade to devel, I now get the same error
07:43:30FromGitter<Varriount> ldlework: cdfcc12
07:44:00ldleworkah I just upgraded to latest commit on devel, and I get the same error now
07:48:45FromGitter<Varriount> ldlework is `Color` final?
07:49:52ldleworkVarriount I'm not exactly sure what that means
07:49:59FromGitter<Varriount> If I change `Color` to `Color = ref object of RootObj`, the error goes away
07:50:12FromGitter<Varriount> and I get your old error
07:50:38ldleworkthere's really no reason for color to be of rootobj
07:51:27FromGitter<Varriount> Though, I still think its a compiler error. `Color` isn't being used as something to inherit from.
07:55:08FromGitter<Varriount> @Araq Should the type argument of a generic cause a inheritance error?
07:55:34FromGitter<Varriount> ldlework: Your type hierarchy keeps making my head hurt
07:57:22ldleworkWhy? Its incredibly simple
07:57:29ldleworkBSPNode -> Leaf
07:57:36ldleworkBSPNode -> ParentNode -> VSplit
07:57:39ldleworkBSPNode -> ParentNode -> HSplit
07:57:40ldleworkthat's it
07:58:44FromGitter<Varriount> It's the fact that they all contain references to each other.
07:59:53Araqvarriount: I don't have enough context and I am busy, sorry.
08:00:33ldleworkVarriount, its a tree
08:00:36ldleworka binary tree
08:00:49ldleworkthe nodes in the tree can either be a binary fork of two children
08:00:55ldleworkor it can be a leaf node, with content
08:01:14*nightmared quit (Ping timeout: 260 seconds)
08:01:34ldleworkthe top node has a region which dictates the sub-regions for all children
08:01:41ldleworkeach parent splits the region into 2
08:01:44ldleworkeither horizontally or vertically
08:02:26*nightmared joined #nim
08:05:49FromGitter<Varriount> Ok, this is really odd.
08:06:12FromGitter<Varriount> Somehow the node types are inheriting from `Color`
08:06:18ldleworklol what
08:06:51FromGitter<Varriount> ldlework: First, change the definition of `Color` to `Color = ref object of RootObj`
08:07:32ldleworkoh well, we don't want that anyway :P
08:07:32FromGitter<Varriount> Try to compile. You should get the error `Error: attempting to call undeclared routine: 'parent='`
08:07:37ldleworkya
08:07:49FromGitter<Varriount> Now add a `parent` field to `Color`
08:09:36ldleworkheh wtffff
08:09:49ldleworkError: type mismatch: got (BSPNode[]) but expected 'float'
08:09:57ldlework(I made parent a float)
08:10:11FromGitter<Varriount> I know. This is an odd one.
08:10:30FromGitter<Varriount> None of those definitions inherit from 'T'
08:11:34ldleworkVarriount, since these bugs are so subtle its hard to create sscce for them
08:12:31*Guest95785 quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/)
08:14:27FromGitter<Varriount> Araq: Final chance to stop us before we lodge another issue and test case.
08:16:47Araqgo ahead.
08:17:16AraqI don't mind issues in the issue tracker. I mind misusing the issue tracker as a personal todo list and then disappearing
08:17:39cheatfatelol
08:17:50Araqhttps://github.com/nim-lang/Nim/issues/1600
08:18:00Araqcomes to mind :P
08:18:06FromGitter<Varriount> :/
08:20:54FromGitter<Varriount> ldlework: You want to log the issue?
08:21:16FromGitter<Varriount> You know more about the program that I do.
08:21:39ldleworkVarriount, again, I just don't see how. We'd need to create an sscce and that just seems unlikely.
08:21:58ldleworkI doubt Araq is going to download my program when addressing the issue.
08:22:16Araqyou would be surprised
08:24:43ldleworkI'll give it a go
08:28:02*ftsf quit (Remote host closed the connection)
08:28:07*gokr joined #nim
08:30:59ldleworkVarriount, fail, https://glot.io/snippets/eortrhnd42
08:31:00ldleworklol
08:32:18ldleworkdamn 900 issues
08:40:50*nsf joined #nim
08:54:32*gokr quit (Ping timeout: 252 seconds)
08:56:33*shashlick quit (Ping timeout: 240 seconds)
08:58:00*shashlick joined #nim
08:58:26ldleworkVarriount, feel free to edit as you see fit to clarify, https://github.com/nim-lang/Nim/issues/5687
09:01:37FromGitter<Varriount> Nope, you hit the nail on the head.
09:03:30dom96"The compiler error is now: ..."
09:03:34dom96is the second error the same as the first one?
09:04:57ldleworkgood catch
09:05:21ldleworkfixed
09:10:43dom96also, which compiler are you using?
09:13:45FromGitter<Varriount> Head
09:16:19dom96interesting issue :)
09:22:39ldleworkMaybe its resolution will lead to some general stability to the generics/inheritance mechanisms
09:24:31*yglukhov joined #nim
09:25:06cheatfateldlework, it looks like your issue is not nim's issue but your code issue
09:25:17ldleworkcheatfate: oh?
09:25:54ldleworkdo tell :)
09:30:40arnetheduckAraq, so what's the deal with pure? is it implied by importc?
09:33:16*nsf quit (Quit: WeeChat 1.7)
09:33:32ldleworkdom96: is there a way to make the while body here a `result=` statement? https://gist.github.com/dustinlacewell/5aefc225d70ada7ba210d5f3f4976087
09:33:35*Arrrr joined #nim
09:33:41ldleworkIE, make the if an expression somehow
09:34:19*yglukhov quit (Remote host closed the connection)
09:34:38dom96Why do you need the `if` when the result is the same?
09:34:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:35:22dom96In any case, it would be: result = if result.backward.contains(x, y): result.backward else: result.backward
09:35:55ldleworkdom96: is there a way to get that on multiple lines?
09:36:09ldleworkalso ther esult being the same is just a typo lol
09:36:12dom96yes, just indent it like you would normally
09:36:55ldleworkthat doesen't work
09:37:04ldleworkoh
09:37:34ldleworknice
09:37:56ldleworknice don't even need the result =
09:39:38dom96oh indeed
09:40:00dom96although that's a bit weird in a while loop
09:45:59*Matthias247 joined #nim
09:54:12ldleworkthe ugliest nim function I've ever written is still not even that bad, https://gist.github.com/dustinlacewell/6f89c59af5a4808450d5cbc67acfb97f
09:55:32dom96:)
09:55:35dom96I like the `as` actually
09:55:53ldleworkyeah it should be in the language imo
09:56:04ldleworkand it should have higher precedence
09:56:13ldleworklike in C#
09:56:24dom96Create an RFC :)
10:00:01ldleworkdom96 you should merge your little gamelib onto dadren
10:00:41*gokr joined #nim
10:01:59dom96Feel free to steal code from it. But I like that it's "light" so I will keep using it as-is.
10:02:52ldleworkdadren is pretty light, have you ever taken a skim over its parts?
10:04:06*yglukhov joined #nim
10:06:49dom96is it renderer agnostic?
10:07:14dom96I can see a bunch of imports to sdl2 throughout
10:07:52dom96My gamelight library targets the web
10:10:27ldleworkdom96: that's why I want to merge
10:10:37ldleworkdom96: my friend has a nim question
10:10:49ldleworkthe table module requires types used as keys to implement eq and hash
10:10:57ldleworklets say you have a base type that provides both as methods
10:11:09ldleworkis there a way to prevent subtypes from overriding one but not both?
10:11:14ldleworkIE requiring subtypes to override both?
10:12:15dom96No idea. I avoid methods as much as I can :)
10:13:08ldleworkVarriount, any idea?
10:16:25*yglukhov quit (Remote host closed the connection)
10:16:51*yglukhov joined #nim
10:20:03*yglukhov quit (Remote host closed the connection)
10:32:18*Vladar joined #nim
10:41:44ldleworkcan someone invent a function that turns an rgb triplet into an integer and another that transforms it back
10:41:50ldleworkso I can use an enum to store colors
10:44:29dom96ldlework: did you see the `colors` module? it's in the stdlib
10:45:19ldleworkcool
10:47:45Vladarldlework, also https://github.com/Vladar4/sdl2_nim/blob/master/sdl2/private/pixels.nim#L381 and below
10:48:40ldleworkhello Vladar
10:49:01Vladarhi
10:49:13ldleworkVladar: you work on anything neat recently?
10:49:45Vladarupdating nimgame2 mostly
10:50:08Vladarv0.4 soon
10:51:39ldleworkcool
10:51:55*PMunch joined #nim
10:52:07Vladaryep, a lot of new neat features
10:52:16ldleworklike what
10:52:31ArrrrWhat does your lib that pure sdl cannot do?
10:52:57ldleworkhis readme lists what it already does
10:53:23Vladarldlework, radiobuttons, palette manipulation, perspective distortion, joysticks support…
10:53:43VladarArrrr, sdl is not a game engine
10:54:11Vladarfor the list of features see https://vladar4.github.io/nimgame2/
10:55:57ArrrrI see, it has a lot of utils
11:11:41dom96My JSON macro is now in devel.
11:28:21*zachcarter joined #nim
11:28:55cheatfateVladar, how do you render truetype fonts?
11:29:35zachcartercheatfate: with https://www.libsdl.org/projects/SDL_ttf/
11:31:27cheatfatezachcarter, freetype based, thank you
11:32:18zachcarterI believe it is freetype based or at least it uses freetype
11:32:42zachcarterI’ve done font rendering with OpenGL / FreeType but not using the SDL renderer I was writing my own OpenGL code
11:33:19zachcarterif you’re interested, I may still have the code on my machine / on github somewhere
11:35:11cheatfatezachcarter, i'm just looking for alternatives... but looks like freetype is the only choice
11:35:23zachcarteroh I see you want something other than freetype
11:35:24zachcarteryeah :/
11:38:50Arrrrcheatfate https://github.com/nothings/stb/blob/master/stb_truetype.h
11:51:34*rokups joined #nim
11:56:23*smt_ joined #nim
11:57:51*smt quit (Ping timeout: 240 seconds)
12:13:09*smt_ is now known as smt
12:15:44*Tiberium joined #nim
12:39:45*Trustable joined #nim
12:41:44arnetheduckinteresting, travis ci builds a merge of devel and the branch, not the branch itself
12:43:00zachcarterhuh
12:43:21*antranigv quit (Ping timeout: 240 seconds)
12:46:39*antranigv joined #nim
13:17:34Tiberiumwhat do you think guys, is it better to port program to nim from this - https://github.com/Francesco149/oppai/blob/master/beatmap.cc , or from this - https://github.com/TiberiumN/pippy/blob/master/pippy/parser/beatmap.py
13:23:14Tiberiumbut yeah, sure I'll port it to Nim from my fork :)
13:25:36zachcarterwhatever language you’re more comfortable with Tiberium, but note - c2nim can handle some C++ I believe
13:25:40zachcarternot sure what the status of py2nim is
13:25:59Tiberiumzachcarter, but I want to port it fully, not wrap it
13:26:12zachcarteryou can use c2nim on implementation ;)
13:26:24Tiberiumso I can use py2nim Araq's snippet to make some simple things faster
13:26:28Tiberiumlike def/proc
13:27:20Tiberiumand yay, I can use parsecfg almost in the same way as "configparser" in python
13:27:25zachcarter:)
13:27:28zachcarterI’m using parsecfg too
13:27:31zachcarterit’s a nice module
13:27:58zachcarterand the format is so simple I have C code generating my config files
13:28:20zachcarterquestion : is it possible to remove and retain an element from a sequence?
13:29:41*gokr quit (Quit: Leaving.)
13:40:05*gokr joined #nim
13:46:08dom96zachcarter: save it in a variable and then remove it from the sequence?
13:49:59zachcarterdom96: was just looking for a single op but fair enough thanks
13:50:33demi-i don't think seqs are supposed to be mutable like that
13:50:39demi-wouldn't you need an array for that?
13:50:49zachcarteryou’re probably right
13:50:55zachcarter*are right haha
13:51:13dom96seqs are mutable
13:51:17dom96arrays aren't
13:51:29dom96well, they can't be grown or shrunk
13:58:46Tiberiummaybe he wants something like list.pop() in python
13:58:55Tiberiumit deleted some thing from list and returns it
13:59:22Tiberiumbtw, about py2nim:
13:59:51TiberiumI think we can do some parsing and converting, and then port some part of python's stdlib
14:01:03dom96perhaps, Nim has the same thing btw
14:01:32*eizua joined #nim
14:12:59*libman has to be the bad / annoying guy and ponder the licensing issues of py2nim'ing code. Does the original license stick?
14:16:08Tiberiumthere's still no real py2nim :)
14:16:24Tiberiumonly Araq's snippet on forum which can convert some definitions
14:16:27Tiberiumbased on regexps
14:16:30FromGitter<mratsim> Hello there
14:16:30dom96Does a binary have the same license as the code it was compiled from?
14:16:38Tiberiumprobably
14:16:46Tiberiumask libman :)
14:17:09dom96hello mratsim
14:18:41FromGitter<mratsim> I’ve been fighting for hours with the type checker, wondering if you can help me
14:23:50FromGitter<mratsim> I’m starting from this minimum code: https://pastebin.com/dp2ugVd9
14:23:57FromGitter<mratsim> (currently paste bin code sample)
14:25:50FromGitter<mratsim> I’m building a Sequence of Nodes, each Node will contain store 2 props `BackProp` that transforms from Type T to Type U (T and U can be SomeReal, Matrix or Vector from lining)
14:26:31FromGitter<mratsim> This works: https://pastebin.com/pgm4UULX - Except that T and U are fixed to float32 and Matrix32
14:27:13*SusWombat joined #nim
14:27:47FromGitter<mratsim> And I need Matrix32 -> Matrix32 and float32 -> Matrix32 proc
14:28:13FromGitter<mratsim> (This is to build a Deep Learning Library)
14:29:18FromGitter<mratsim> Try 1: wrapping in a “Tensor”. Error “Cannot evaluate at Compile time T - https://pastebin.com/i1AhAaZ2
14:31:48FromGitter<mratsim> Try 2: removing the [T, U] generics from “Context”. Error seq[Node] is not a concrete type https://pastebin.com/BFjwuFDG. I tried that for `BackProp`and `Node` but it’s still the same
14:33:20FromGitter<mratsim> Try 3 is a redo of Try 1 with Tensor = float32 or Matrix32, I get “Cannot instantiate Matrix32"
14:35:42FromGitter<mratsim> The only solution I see so far is through Object Variant, but I’m not even sure I can type check the various [M, N: static[int], T] inside. ⏎ ⏎ For reference, here is my full code - https://github.com/mratsim/nim-rmad
14:36:20*PMunch quit (Quit: leaving)
14:38:01FromGitter<mratsim> s/lining/linalg
14:51:54zachcarteris there any way to get a sub sequence from a sequence? like elements 1-4 out of a 5 element sequence?
14:52:07*Matthias247 quit (Read error: Connection reset by peer)
14:57:18Vladarzachcarter mySeq[1..4]
14:57:29zachcarterthank you Vladar
14:57:45Vladarwell, [1..3] for 1-4 elements, actually
15:27:25*SusWombat quit (Remote host closed the connection)
15:28:18FromGitter<battila7> Question about typing: As long as the compiler can be sure that fields are accessible and methods have correct types duck typing can be used without explicit type constraints (such as Concepts). Is this right?
15:30:48FromGitter<mratsim> var test = new seq[float32] ⏎ test.add(3) ⏎ ⏎ Error: type mismatch: got (ref seq[float32], int literal(3)) ⏎ but expected one of: ... [https://gitter.im/nim-lang/Nim?at=58ea53aa08c00c092a637a7e]
15:33:34FromGitter<Varriount> @mratsim Make it 3.0
15:34:39FromGitter<Varriount> @battila7 In what context? Generics, or type parameters in general?
15:35:52FromGitter<battila7> I'd say when using type parameters in general
15:37:52FromGitter<Varriount> Then yes, you *can* omit type parameters, and the compiler will do its best to infer the type.
15:38:51FromGitter<Varriount> However, the compiler can throw some odd and misdirecting errors when it can't properly infer the type.
15:41:15FromGitter<battila7> Yes, I see. But I suppose, this is not the proper Nim way of developing applications, is it?
15:42:48FromGitter<mratsim> @Varriount it was a reply to @battila7 ;)
15:43:14FromGitter<Varriount> Well, we have static typing and your parameters for a reason
15:44:23FromGitter<Varriount> @battila7 does that error occur when the type is "float"?
15:45:58TiberiumBTW, how to ask compiler to output types he guessed?
15:46:09Tiberium(when I have some "auto"'s in my code)
15:46:39FromGitter<battila7> @Varriount still does not compile
15:48:01FromGitter<Varriount> @battila7 I'm going to say that's because not all integers can be accurately expressed as floats
15:48:54FromGitter<Varriount> @TiberiumPY You can use `type(expression)` to get the type of an expression or variable.
15:49:01Tiberiumah, thanks
15:49:42FromGitter<battila7> It might be silly, but how come that this does not compile as well: ⏎ ~~~~ ⏎ var test = new seq[float64] ⏎ ⏎ test.add(0.0'f64) ... [https://gitter.im/nim-lang/Nim?at=58ea581868bee3091f26655a]
15:51:05TiberiumVarriount - and how to output it at compile time?
15:52:07FromGitter<battila7> Using `when`?
15:53:07Tiberiumah
15:53:11Tiberiumname(type(3))
15:53:22FromGitter<Varriount> Tiberium: ```static: \n echo type(expression)```
15:53:41Tiberiumit doesn't work
15:54:13FromGitter<Varriount> Woops. Import `typetraits`
15:54:36FromGitter<Varriount> And use `echo name(type(expression))`
15:55:08Tiberiumworks now :)
15:56:21FromGitter<Varriount> There's probably another way, but that's what I used yesterday
15:57:27FromGitter<mratsim> @battila7 sorry my example was wrong: ⏎ ⏎ var test:seq[float64] = @[] ⏎ ⏎ test.add(0’f64) ... [https://gitter.im/nim-lang/Nim?at=58ea59e9b52518ed4df55b95]
15:58:10FromGitter<mratsim> the new seq syntax works for ref object
15:59:09FromGitter<battila7> Yup, I figured it out by now. I was a bit surprised at first :smile:
16:00:12Tiberiumbtw, I think py2nim can start as something like shedskin
16:00:26Tiberium(shedskin is python to C++ compiler - very restricted)
16:00:29Tiberiumhttps://github.com/shedskin/shedskin
16:00:32FromGitter<Varriount> New syntax?
16:01:55FromGitter<mratsim> Yes: ⏎ ⏎ proc newContext*(T: typedesc[SomeReal]): Context[T] {.noSideEffect.} = ⏎ ## Initialize a context (Tape / Wengert list) ⏎ result.nodes = new seq[Node[T]] ... [https://gitter.im/nim-lang/Nim?at=58ea5af5f22385553d2445c9]
16:02:37FromGitter<mratsim> Node[T] being an object
16:03:03FromGitter<mratsim> and Context and ref object
16:04:11*Ven joined #nim
16:04:35*Ven is now known as Guest99305
16:08:14*Guest99305 quit (Client Quit)
16:31:15FromGitter<mratsim> Regarding my question previously, I also get the not a concrete type error with an object variant. ⏎ ⏎ > Mamy Ratsimbazafy @mratsim 16:18 ⏎ > I’ve been fighting for hours with the type checker, wondering if you can help me ⏎ > ... [https://gitter.im/nim-lang/Nim?at=58ea61d568bee3091f268bad]
16:48:13FromGitter<Varriount> @mratsim Once I get home I'll see what I can do.
16:48:20*nsf joined #nim
16:49:27*arnetheduck quit (Ping timeout: 255 seconds)
16:49:59FromGitter<mratsim> @Varriount, terrific ! Otherwise, I probably would have to reimplement my custom type instead of using Andrea’s linalg
16:56:31*Trustable quit (Remote host closed the connection)
17:08:19FromGitter<mratsim> @Varriount If I’m not around, you can reply to this github isssue I’ve open in my repo: https://github.com/mratsim/nim-rmad/issues/4
17:08:25*nsf quit (Quit: WeeChat 1.7)
17:13:32nivhello. whats the recommended way to organise unittests, multiple suites, into many files, and then run them all with one command?
17:15:22Tiberiumniv, look at any big project source :)
17:16:09nivyes, im shopping around and i have ideas, but so far none of them really convince me. i was wondering if there's a recommended/official way i missed.
17:16:36nivi suppose compiling them all into a single binary isn't the way to go; instead use a testrunner or a glob matcher that runs them all standalone
17:23:03FromGitter<mratsim> you can do multiple test files, and use include in a single file so that you can run all them at once
17:23:39nivfair enough.
17:24:05FromGitter<Varriount> @mratsim Is there a specific branch I should check out, or a file I should run?
17:24:19FromGitter<mratsim> @niv: https://github.com/vegansk/nimfp/blob/master/tests/fp/test_all.nim
17:25:11FromGitter<mratsim> @Varriount no, you can check on master. it has the latest code. I put the example code in the Github issue
17:27:00*Vladar quit (Quit: Leaving)
17:27:00nivmratsim: yeah, thanks.
17:27:05Tiberiumniv, there's "unittest" module
17:27:23nivyes, im working with unittest. im just thinking about organising it
17:31:05*libman quit (Quit: Connection closed for inactivity)
17:34:08FromGitter<Varriount> @mratsim Just to clear things up.. the problem with the first code sample in that issue is that both T and U can't be a matrix?
17:34:44FromGitter<Varriount> I'm trying to figure out what it is the problem with the first code sample is.
17:34:48FromGitter<mratsim> Yes, I will have float32 -> Vector32, Vector32 -> Matrix32, Matrix32 -> Matrix32
17:34:58FromGitter<mratsim> the very first works
17:36:53FromGitter<Varriount> @mratsim So `let ctx = newContext[Matrix32[2,2], Matrix32[2,2]]` fails?
17:37:18FromGitter<mratsim> in the first example that would work
17:37:33FromGitter<Varriount> Then what won't work in the first example?
17:38:05FromGitter<mratsim> the issue is that I would be forced to have only BackProp[Matrix32, Matrix32] in the sequence
17:38:51FromGitter<mratsim> I need BackProp[float32, Matrix32] BackProp[Vector32, Matrix32] as well
17:39:18FromGitter<Varriount> You want `Context.nodes` to contain a non-homogenous mixture of data?
17:39:50FromGitter<mratsim> yes
17:40:04FromGitter<mratsim> well, those are all closures
17:41:13FromGitter<Varriount> Generics only deal with compile-time types. Putting `Tensor = float32 or DVector32` just creates a semi-abstract type constraint
17:41:45FromGitter<mratsim> Yeah I saw, if I only have Tensor = float32 or Tensor = DVector32 it compiles
17:42:20FromGitter<Varriount> Think of it - if you access Context.nodes[1], how do you know whether the `T` in the returned element is a float, matrix, etc?
17:42:39FromGitter<Varriount> You have to use a wrapper type or object variant to differentiate
17:43:17FromGitter<Varriount> ldlework is doing something similar with binary-space-partition trees.
17:43:21FromGitter<mratsim> By wrapper type, do you mean inheritance or something else ?
17:43:47FromGitter<Varriount> Inheritance, yes.
17:44:09FromGitter<Varriount> You would have to wrap Matrix, float32, etc, because those types are already implemented.
17:44:24FromGitter<Varriount> So, let me come up with something.
17:45:14FromGitter<Varriount> Another possibility is wrapping the backprop as closures
17:45:20*ngc joined #nim
17:45:26FromGitter<mratsim> I tried Object Variant but I had a `Not a concrete type`issue for Vector32: https://gist.github.com/mratsim/2f9d4cd301cd48f15c9789809432dbe8
17:45:56FromGitter<mratsim> probably because Vector32 is actually Vector32[M, N: static[int]; T]
17:46:01FromGitter<Varriount> @mratsim You're putting type names as the members of an enum. That's going to cause problems.
17:47:29FromGitter<mratsim> I see, I prepended with a T. (still issue with concrete type)
17:48:02*rauss joined #nim
17:48:29FromGitter<Varriount> @mratsim Assuming that we did have a non-homogenous sequence, how were you planning to call `()` the elements in `Node.weights`?
17:48:33FromGitter<mratsim> If I only had to wrap backprop that would be best (it’s actually just a wrapper already)
17:49:25FromGitter<Varriount> I mean, what did you expect would happen if the wrong type of arguments were passed in?
17:49:49FromGitter<mratsim> compilation failure
17:50:03FromGitter<mratsim> call is there: https://github.com/mratsim/nim-rmad/blob/master/src/autograd.nim#L150
17:50:04FromGitter<Varriount> But such a thing can't be determined at compile time.
17:50:51FromGitter<Varriount> Hm.
17:51:02FromGitter<Varriount> But perhaps a tuple might work?
17:51:17*ngc quit (Quit: ngc)
17:51:37FromGitter<mratsim> I tried tuples as well but I couldn’t make it work :/
17:52:56FromGitter<Varriount> @mratsim Are the lengths of `Node.weights` and `Node.parents` going to change in the future?
17:53:41FromGitter<mratsim> no they will always have 2 elements
17:53:56FromGitter<Varriount> I'm going to come up with a possible solution, and you can tell me if it's satisfactory.
17:54:16FromGitter<mratsim> Basically I’m building a call graph of unary and binary operations
17:56:24FromGitter<mratsim> thanks
17:57:40FromGitter<Varriount> I don't think I'll be able to give you compile-time errors though.
17:57:49FromGitter<mratsim> btw: I’m trying to find idlework binary space partion tree repo but I can't
17:58:15FromGitter<Varriount> Because a sequence has a nondeterministic length, access to it can't be checked the same way a tuple can be checked.
17:58:16FromGitter<mratsim> well that’s fine :), the compile will catch the error in the forward pass
17:58:22FromGitter<mratsim> compiler*
18:00:37*Trustable joined #nim
18:01:12FromGitter<mratsim> If I do a x * y operation, I add [gradient a, gradient b] to the sequence. If it typecheck at that point, it means the backward pass will work. (Obviously I will put proper testing for that). If the user tries not compatible operations (wrong Matrix size say) it will be catched before the program uses the sequence of BackProp
18:02:20FromGitter<Varriount> The problem is that if you add more types, the number of cases to handle is going to grow very quickly.
18:03:14FromGitter<Varriount> Does `Node.weights` need to be non-homogenous too?
18:04:18FromGitter<mratsim> with a Node no
18:04:59FromGitter<mratsim> within*
18:05:51FromGitter<Varriount> What are all the types `T` and `U` could be?
18:06:23FromGitter<mratsim> float32, DMatrix32, Matrix32, DVector32, Vector32
18:07:19FromGitter<Varriount> Ugh. @Araq is probably going to kill me for using methods.
18:07:49FromGitter<mratsim> :D
18:08:15FromGitter<mratsim> I’ll check the closures or the BackProp wrapper as well
18:14:18FromGitter<battila7> @Varriount Methods are that evil?
18:14:37FromGitter<Varriount> @Araq tends to seem them as a sign of moral weakness. .:D
18:15:38Tiberiumhmm, is it for me only? nimx doesnt compile
18:16:02FromGitter<battila7> Dynamic dispatch can be a code smell, but coming from Groovy one can easily appreciate it
18:16:04FromGitter<TiberiumPY> /home/tiber/.nimble/pkgs/nimsl-0.2/nimsl/nimsl.nim(75, 60) Error: type mismatch: got (array[0..1, float32]) but expected 'vec2 = vecBase[2, system.float32]'
18:16:23Tiberiumsome recent changes in compiler broke nimsl?
18:18:31TiberiumI think this isn't good, since nimsl powers nimx gui framework
18:24:31*PMunch joined #nim
18:24:39FromGitter<stisa> Tiberium I think it's a known issue? https://github.com/nim-lang/Nim/issues/5640
18:24:48Tiberiumah yes, sorry
18:24:52FromGitter<Varriount> @mratsim Instead of `BackProp` being a procedure, couldn't it just hold two values?
18:25:23Tiberiumah, https://github.com/nim-lang/Nim/pull/5677 seems that zah fixed it
18:25:55FromGitter<mratsim> @Varriount that’s actually what I have 2 days ago, but it can’t.
18:26:03FromGitter<mratsim> what I had*
18:26:19FromGitter<Varriount> @mratsim Your problem is really tricky.
18:26:43FromGitter<mratsim> @Varriount: here is the reason why I can’t just hold the value: https://github.com/mratsim/nim-rmad/issues/2
18:28:39FromGitter<mratsim> @Varriount, if you can’t find a solution. It’s fine, don’t lose your sleep on it
18:30:18FromGitter<mratsim> I think Multilinear Algebra in general is hard to type check properly. You have functions: Scalar -> Vector, Vector -> Matrix, Matrix -> Matrix, Matrix -> Scalar, that’s one thing. Second is that dimensions must be compatible.
18:32:52Tiberiumyay, nimx compiles with zahary pull request
18:34:49Tiberiumor not
18:35:15Tiberiumoh yeah it does
18:36:37FromGitter<Varriount> Anyone know if an arbitratry closure has a parent?
18:40:17FromGitter<Varriount> Also, anyone used the call `.()` operator?
18:40:31Tiberiumwat? you can even overload .() ?
18:42:31FromGitter<Varriount> https://nim-lang.org/docs/manual.html#special-operators-operator
18:43:48Tiberiumso you have a thing like __setattr__ in python
18:43:49Tiberiumlol
18:50:53FromGitter<stisa> @Varriount never used `.()` myself, I only know of jsffi (https://github.com/nim-lang/Nim/blob/devel/lib/js/jsffi.nim) that uses `.()` to access fields
18:51:41*Matthias247 joined #nim
18:53:50demi-that seems pretty gross imo
18:55:00Tiberiumwell, for js it's mandatory
18:55:11Tiberiumso you wouldn't end using ["something"] everywhere
18:55:46demi-that seems preferable tho
18:56:59FromGitter<battila7> Great feature in my opinion :)
18:57:25Tiberiumbut wait, is it compile-time or runtime?
18:57:27Tiberiumit seems that runtime
18:57:45Tiberiumah, you can do anything inside `.()`
19:12:56FromGitter<Varriount> @mratsim I've come up with a solution that almost works, but doesn't compile.
19:13:17ldleworklol
19:13:46FromGitter<Varriount> @mratsim I'd post about your problem on the forum. Say that you need a way for `Context.nodes` to contain nodes with different procedures.
19:14:23FromGitter<mratsim> Thanks! that’s how I don’t sleep. “It almost compile, just one more time” “Hehe, it’s 5AM, how come"
19:15:05FromGitter<mratsim> I’ll register there then and post, thanks for your help.
19:22:34FromGitter<battila7> @mratsim Clearly we all share this type of addiction
19:23:55dom96Tiberium: It's not mandatory for JS, it's just more convenient.
19:24:03Tiberiumyeah, I know
19:30:41*nsf joined #nim
19:42:16*rokups quit (Quit: Connection closed for inactivity)
19:44:40ldleworkzachcarter: does Frag have a windowing system yet?
19:52:41*Nobabs27 joined #nim
20:04:03*Arrrr quit (Quit: Leaving.)
20:20:45*rauss quit (Quit: WeeChat 1.7)
20:35:56ldleworkVarriount, I got another one :(
20:38:42FromGitter<Varriount> I'm resting at the moment.
20:42:31ldleworkI wish I knew what this error meant, Error: cannot instantiate: 'Point'
20:42:53FromGitter<mratsim> How long should it takes to get the forum the registration mail ? instant?
20:44:28ldleworkinteresting
20:44:34dom96mratsim: I'll confirm the account for you
20:44:48dom96done
20:44:51ldleworkfor making simple data types its slightly better to make tuple aliases because you will get things like hash() for free
20:46:49FromGitter<mratsim> thanks @dom96
20:48:02*Tiberium quit (Remote host closed the connection)
20:55:13*xtagon joined #nim
21:04:44*eizua quit (Quit: Leaving)
21:07:14*vlad1777d quit (Remote host closed the connection)
21:13:33subsetparkldlework: I think Araq disagrees; my impression is that if you're not making use of structural typing, you're better off making an object
21:17:19*xtagon quit ()
21:19:30euantorSuper late to the party with regard to dom96's work on the JSON stuff, but it sounds awesome.
21:19:33euantor"In the future I will probably generalise this macro so that it can be used for other formats."
21:20:08euantor^ That would be pretty nice. Would be cool to have something like Rust's Serde https://serde.rs
21:20:13dom96euantor: :D
21:20:41euantorAll the interesting discussion seems to happen the I'm away :D
21:20:54FromGitter<TiberiumPY> What's my best choice for parsing text file? First part of it is simple .ini, and second part contains .ini sections and strings like "0;1;2;3;5:6:7"?
21:21:36FromGitter<TiberiumPY> I mean if i wild would do simple for line in text.splitlines after parsing first part (normal ini)
21:21:54FromGitter<TiberiumPY> /s/wild//
21:22:29FromGitter<Varriount> Nim has parsing modules. You could try those
21:23:31FromGitter<TiberiumPY> Yeah I will use parsecfg for the first part of file
21:24:25FromGitter<TiberiumPY> Ah
21:24:43FromGitter<TiberiumPY> strscans probably
21:27:50FromGitter<TiberiumPY> Yeah, scanf from strscans would be perfectly fine for me
21:29:30FromGitter<TiberiumPY> LOL
21:30:48FromGitter<TiberiumPY> it seems I used termcolor library from github (last update in 2011), and now I see 'terminal' in std
21:30:58FromGitter<TiberiumPY> Stdlib
21:39:34*Trustable quit (Remote host closed the connection)
21:54:10*PMunch quit (Quit: leaving)
22:10:12*Jesin joined #nim
22:17:01*Jesin quit (Quit: Leaving)
22:26:52*zachcarter quit (Read error: Connection reset by peer)
22:27:11*zachcarter joined #nim
22:28:51*gokr quit (Quit: Leaving.)
22:42:56*Matthias247 quit (Read error: Connection reset by peer)
22:49:02*bjz joined #nim
23:02:58*Jesin joined #nim
23:03:03*nsf quit (Quit: WeeChat 1.7)
23:10:45*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:44:42*shashlick quit (Ping timeout: 252 seconds)
23:45:47*shashlick joined #nim