<< 12-11-2016 >>

00:03:18*Matthias247 quit (Read error: Connection reset by peer)
00:05:13*yglukhov quit (Remote host closed the connection)
00:43:59*xet7 quit (Ping timeout: 258 seconds)
00:44:27*xet7 joined #nim
00:52:08*ephja quit (Ping timeout: 260 seconds)
01:05:43*yglukhov joined #nim
01:07:45*chemist69 quit (Ping timeout: 258 seconds)
01:10:31*yglukhov quit (Ping timeout: 268 seconds)
01:10:56*vlad1777d quit (Remote host closed the connection)
01:12:37*chemist69 joined #nim
01:32:02*arnetheduck joined #nim
02:01:19*pie__ joined #nim
02:01:59*pie__ quit (Changing host)
02:01:59*pie__ joined #nim
02:12:23FromGitter<GraydenH> so probably an sdl window
02:18:14FromGitter<GraydenH> what if I wanted to draw a rotated rect?
02:23:03*gangstacat joined #nim
02:30:08*chemist69 quit (Ping timeout: 260 seconds)
02:31:18*vendethiel joined #nim
02:40:10*vendethiel quit (Ping timeout: 256 seconds)
02:43:13*chemist69 joined #nim
02:52:39*perturbation joined #nim
03:00:25*akiradeveloper joined #nim
03:00:25*akiradeveloper quit (Client Quit)
03:39:38*CcxWrk quit (Ping timeout: 245 seconds)
03:43:26*CcxWrk joined #nim
03:52:39*ftsf joined #nim
04:26:54*akiradeveloper joined #nim
04:28:24*bjz quit (Ping timeout: 256 seconds)
04:28:40*bjz joined #nim
04:40:09*tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 49.0.2/20161019084923])
04:51:37*brson quit (Quit: leaving)
05:45:32*dddddd quit (Remote host closed the connection)
06:09:42*nsf joined #nim
06:11:30*yglukhov joined #nim
06:15:50*yglukhov quit (Ping timeout: 246 seconds)
07:01:08*perturbation quit (Ping timeout: 250 seconds)
07:06:56*pie__ quit (Ping timeout: 246 seconds)
07:23:00*akiradeveloper quit ()
07:57:50*yglukhov joined #nim
08:20:36*arnetheduck quit (Remote host closed the connection)
08:25:57*arnetheduck joined #nim
08:28:38*yglukhov quit (Remote host closed the connection)
08:32:40*yglukhov joined #nim
08:37:20*yglukhov quit (Ping timeout: 260 seconds)
09:12:56*gangstacat quit (Ping timeout: 246 seconds)
09:18:25*gangstacat joined #nim
09:31:56*yglukhov joined #nim
09:36:48*yglukhov quit (Ping timeout: 268 seconds)
10:17:08*yglukhov joined #nim
10:21:33*yglukhov quit (Ping timeout: 256 seconds)
10:26:33*Trustable joined #nim
10:32:48*jivank quit (Ping timeout: 260 seconds)
10:45:00*ephja joined #nim
10:52:47*yglukhov joined #nim
11:00:04*yglukhov quit (Remote host closed the connection)
11:06:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:18:36*yglukhov joined #nim
11:25:59FromGitter<yglukhov> @GraydenH you should use transformations. see animations sample.
11:29:49*cheatfate joined #nim
11:48:33FromGitter<ephja> will software rendering be supported?
11:48:43*ephja quit (Quit: Leaving)
11:59:34*bjz joined #nim
12:00:52*nsf quit (Quit: WeeChat 1.6)
12:00:59FromGitter<yglukhov> i dont think so. why would you need it?
12:02:05*Snircle joined #nim
12:11:30FromGitter<ephja> lack of opengl support does indeed seem rare these days
12:16:51*vlad1777d joined #nim
12:18:48*cheatfate quit (Ping timeout: 245 seconds)
12:21:45*cheatfate joined #nim
12:30:34*derlafff quit (Quit: http://quassel-irc.org - ????????????? ??????. ?????.)
12:30:46*derlafff joined #nim
12:30:46*derlafff quit (Client Quit)
12:30:56*derlafff joined #nim
12:32:57*jivank joined #nim
12:37:26*Trustable quit (Remote host closed the connection)
12:42:08corecodeso i'm trying to learn nim and use it for arm microcontroller
12:43:27FromGitter<ephja> corecode: I don't know much about it, but I found this https://github.com/glurp/nim-arm
12:43:46corecodeheh that's too large of a system :)
12:44:41FromGitter<ephja> it's possible that the compilation flags are compatible
12:47:07corecodeso what i need to do is either use the vendor header files, or use a specific xml description to generate nim code for accessing registers and fields of registers
12:49:01FromGitter<ephja> I'll leave it to someone else, but several forum posts do mention ARM and it's possible to reference headers. GL
12:50:54corecodespecifically, peripherals consist of a set of registers that are at specific memory-mapped locations, and registers can contain a value or multiple bit fields (unsigned, enumerations, or booleans)
13:16:05corecodehow would i represent a peripheral?
13:16:40corecodein C it is implemented using structs, with explicit padding to place the fields at the right (relative) offsets
13:16:42ftsf\o/ got jack + midi support working in my nim modular synth thingo
13:18:46*Matthias247 joined #nim
13:20:42corecodeis there a way to place a variable at a specific memory location?
13:24:17*xet7 quit (Quit: Leaving)
13:25:41*byte512 joined #nim
13:25:56*desophos quit (Read error: Connection reset by peer)
13:35:07*nsf joined #nim
13:39:58*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:40:09corecodewhat would be an idiomatic way to access multiple fields of a hardware register (i.e. bit fields)
13:40:48corecodetypical operations would be: - read complete value (uint32), then read fields separately from this copy
13:42:58corecode- assign several fields concurrently (i.e. read + masked and + or + write)
13:43:42corecode- write new value defined by several fields
13:45:12FromGitter<gogolxdong> @corecode We have two interests in common , ARM development and blockchain.
13:46:16corecodewould you suggest using some sort of accessor procs that take named arguments?
13:46:36corecodegogolxdong: i'm about to quit hyperledger :)
13:46:46FromGitter<gogolxdong> why
13:47:26corecodethe development is messy and i am starting my own electronics + firmware consulting company
13:48:09FromGitter<gogolxdong> Does it involve blockchain?
13:48:34corecodeno :)
13:48:48FromGitter<gogolxdong> I knew Nim will bring opportunity for startup company.
13:49:02corecodei'm no startup
13:50:24FromGitter<gogolxdong> There are a lot of perspectives about blockchain, I wonder whether it is exaggerated.
13:50:52FromGitter<gogolxdong> Does it involve IoT?
13:50:55corecodefor sure is
13:51:00corecodenot really
13:51:30corecodei already was at an iot startup - lots of marketing hype, very few concepts that can make money
13:51:52FromGitter<gogolxdong> :)
13:53:44corecodei suggest reading bruce sterling's the eternal struggle of the internet of things
13:54:00corecodeso back to the subject
13:55:10cheatfatecorecode, nim supports object bitfields
13:55:30cheatfatealso it supports pragma pack
13:55:43FromGitter<gogolxdong> I will, I am searching an opportunity to start my own business too.
13:56:21FromGitter<gogolxdong> Nim simplify a lot of things.
13:57:59FromGitter<gogolxdong> I acquired the technology stack of blockchain, no time to dig further.
13:58:23corecodecheatfate: yea, but i think we can do better than just using c bitfields
13:58:59corecodegogolxdong: a what? sounds like marketing speak
14:00:19cheatfatecorecode, what can be better?
14:00:55cheatfatesome procs like setBits(pos, value) and getBits(pos)?
14:00:56FromGitter<gogolxdong> which part
14:01:06corecodecheatfate: first, most people don't use bitfields because of C compiler difficulties (big endian vs little endian byte ordering of fields)
14:01:27corecodecheatfate: to clarify, i'm not talking about a sequence of single bits
14:02:15corecodebut a compound value, where you might have a 3-bit unsigned integer at bit pos 4-2, a 2-bit integer on pos 1-0, and a boolean on pos 32
14:02:17corecode31*
14:02:33corecodelet's say you want to set all of these values concurrently
14:02:43corecodec bitfields don't allow you to do that
14:02:55cheatfatewhat you mean `concurrently`?
14:03:03corecodeone memory write
14:05:03*couven92 joined #nim
14:05:08cheatfatecorecode, you mean one operation or i can prepare such value in some variable and then make one memory write?
14:05:24corecodein the end it has to happen in one processor write
14:05:43corecodebut of course you can prepare that value before
14:06:01FromGitter<gogolxdong> I am not that familiar with Nim either with blockchain in detail as you, sometimes I can only say something macroscopical.
14:06:30corecodegogolxdong: what's your blockchain technology stack?
14:07:07cheatfatecorecode, so you want something like var a = {0-1: 2bit, 2-4: 3bit, 31-32: 1bit}?
14:07:28FromGitter<gogolxdong> protobuf, gRPC, PBFT etc.
14:07:48FromGitter<gogolxdong> from hyperledger.
14:08:05corecodecheatfate: i don't know that syntax
14:08:17corecodegogolxdong: lol good luck
14:08:40cheatfatecorecode, there no such syntax, i'm just trying to satisfy your request
14:09:01cheatfatecorecode, to set many fields in one integer
14:09:51corecodewell, i was thinking of something like
14:11:20corecodemyperiph.regfoo.set(bar = 3, baz = 7, enable = 1)
14:12:17corecodeand regfoo's type has a set proc which translates these argument names to shifts, etc.
14:12:55corecodewould that feel idiomatic?
14:13:36FromGitter<gogolxdong> I saw a video on TED,it described a promising future about blockchain which inspirited me.
14:13:42cheatfatecorecode, but it looks more like bitfields structures :)
14:13:52corecodecheatfate: what does?
14:14:31cheatfatecorecode, to make such set you first need to declare `bar`, `baz`, `enable` to bit positions
14:14:42corecodecheatfate: and widths, yes
14:15:19cheatfatecorecode, so it looks like declare structure with bitfields
14:15:48corecodei don't understand what you are trying to tell me
14:17:10cheatfatecorecode, do you know such nim construction like var a = SomeObject(objField1: 7, objField2: 3, objField3: 1)?
14:17:11*fredrik92 joined #nim
14:17:22corecodeno i don't
14:17:29corecodedoes that exist?
14:17:33cheatfatecorecode, yep
14:18:06cheatfateit exists
14:18:17cheatfatetype someObject = object
14:18:24cheatfateobjField1: int
14:18:24*fredrik92 quit (Client Quit)
14:18:29cheatfate...
14:18:40cheatfatevar a = someObject(objField1: 123123)
14:19:02corecodeoh that
14:19:15corecodeconstructor
14:20:48corecodecheatfate: i'm not sure we're really communicating
14:20:51*couven92 quit (Ping timeout: 265 seconds)
14:21:23cheatfateok
14:21:27corecodeok?
14:22:41cheatfatecorecode, i dont know what to say on `i'm not sure we're really communicating`
14:26:52corecodeok. what are you telling me? is there already a way to do what i want to do?
14:30:03corecodeso i'm thinking of using a macro which takes the bitfields as arguments and defines an object which has respective accessors and set/reset procs
14:31:52cheatfatecorecode, i think it would be easier to define object with bitfields, set values with constructor to some stack variable and then set your register with value of stack variable
14:32:31corecodethat sounds like the code would be less "clean"
14:32:34corecodemore noisy
14:32:36corecodeno?
14:38:13cheatfatecorecode, i think you can make some kind of template for it
14:38:27cheatfateto hide usage of `stack variable`
14:39:28corecodei see what you are saying
14:40:04corecodeuse the constructor to set the fields, and then do an assignment
14:40:14corecodewhat about only setting a subset of fields?
14:40:31corecodesay we have f1, f2, f3, f4, and we just want to set f1 and f3
14:40:40corecodeand keep f2 and f4 as is
14:41:29corecodethe underlaying operation would be read, and inverse to clear f1 and f3, or new values of f1 and f3, write back
14:41:57*vl409 joined #nim
14:42:43cheatfateyou can set only some of fields in constructor
14:43:25cheatfatevar a = somevalue
14:43:43cheatfatevar a = 7237237232
14:44:02cheatfatevar b = cast[ptr someObject](addr a)[]
14:44:27vl409corecode: you should forget about bitmask and bitfields. Especially if you're targeting ARM
14:45:23vl409ARM has UBFX SBFX instructions. So you either replicate exactly what it is as cheatfate said
14:45:26corecodevl409: you mean C bitfields?
14:45:49vl409or use setter getter, that will be asm code
14:46:06corecodeah i see
14:46:38corecodeyou think the c compiler can't figure it out to use ubfx if applicable?
14:46:58vl409I don't know nim. So I have no idea, but if C bitfields == nim bitfields survive into asm as shortest code, then go for them.
14:47:39corecodewell c bitfields are a nuisance
14:48:05corecodeand if we use setters and getters, the backend implementation can be switched as desired
14:49:36*vendethiel joined #nim
14:50:21vl409In short: 1) Do you need speed? If not, then ... 2) how does the code coming out of arm-eabi-gcc looks like. You'd have to test it.
14:51:05vl409I would however like to know the answer, too :-) (no worries - not starting any business)
14:51:07corecodefirst i want an idiomatic interface
14:51:32corecodeclear programming interface is king
15:04:03*Guest73656[m] joined #nim
15:08:34FromGitter<gogolxdong> A lot of my current work components are written in JAVA which I'd like to rewrite in Nim for performance and memory usage. I dabbled in C a couple of years ago and consider a similar way to construct such a bitfields while I work with Golang for Paas for now, no chance and no longer do such low level optimization as I desired like you.
15:18:56*vendethiel quit (Ping timeout: 256 seconds)
15:23:57FromGitter<gogolxdong> Not native speaker , correct me if there is something vague or offensive.
15:30:57FromGitter<gogolxdong> Nim needs a killer application. I can't see that far, digging it up little by little.
15:34:26*perturbation joined #nim
15:36:35*couven92 joined #nim
15:37:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:41:06vl409type
15:41:06vl409 SomeObject* = object
15:41:06vl409 data {.bitsize:7.}: cuint
15:41:06vl409 w {.bitsize:1.}: cuint
15:41:06vl409 h {.bitsize:2.}: cuint
15:41:43vl409But being new to Nim, I don't know how constructor's are written
15:42:34vl409proc createSO*(d,w,h: cuint): SomeObject = result.w = w ; result.h = h ; result.data = d
15:42:47vl409var a = createSO(3,0,2)
15:43:14vl409But more importantly, I've been searching ....
15:43:55vl409corecode: Have you seen this: https://zinc.rs/
15:44:21vl409and this: https://www.youtube.com/watch?v=o5m0m_ZG9e8
15:56:36*vl409 quit (Quit: Leaving)
16:17:33*yglukhov quit (Remote host closed the connection)
16:22:20*yglukhov joined #nim
16:25:22FromGitter<ephja> SomeObject(data: a, w: b, h: c)
16:26:04*dmi0 joined #nim
16:26:45*yglukhov quit (Ping timeout: 248 seconds)
16:29:56corecodenot interested in zinc
16:33:20*yglukhov joined #nim
16:37:33*yglukhov quit (Ping timeout: 245 seconds)
16:39:04*yglukhov joined #nim
16:40:32*libman joined #nim
16:43:18FromGitter<ephja> iz good nutrient
16:43:23*yglukhov quit (Ping timeout: 246 seconds)
16:43:47*delian66 joined #nim
16:50:04*yglukhov joined #nim
16:55:10*dmi0 quit (Ping timeout: 244 seconds)
16:55:18*dmi00 joined #nim
16:57:01*yglukhov quit (Ping timeout: 260 seconds)
17:03:00*yglukhov joined #nim
17:20:57*Zaibon joined #nim
17:22:20ZaibonHello, I'm a newcomer to nim and I'm trying to get my head around nimble at the moment.
17:22:41ZaibonI'm facing a issue and I'm not sure if it's a bug or it's the expected behaviour.
17:23:06Zaibonso the situation. I have a package A that requires another package B
17:23:16Zaibonthen I have a binary project that requires A
17:23:36Zaibonso in the nimble file of the project I only requires A
17:23:53Zaibonbut when I try to compile, nimble complains that it can't find package B
17:24:19Zaibonis it normal behavior ? and I should explicitly requires all depencies of all my dependencies ??
17:24:45Zaibonthat's doesn't sound right to me.
17:40:03*perturbation quit (Ping timeout: 245 seconds)
17:42:10*perturbation joined #nim
17:47:38dom96Zaibon: it's a bug, grab Nimble from GitHub for a fix.
17:52:53Zaibondom96: thx ;-)
18:36:55*vlad1777d quit (Quit: Leaving)
18:41:19*perturbation quit (Ping timeout: 268 seconds)
18:42:56*dmi00 quit (Ping timeout: 256 seconds)
18:58:00yglukhovdom96: hi. seen my openssl pr?
18:59:35*xet7 joined #nim
19:17:18*vendethiel joined #nim
19:17:57*gokr joined #nim
19:20:03*cheatfate quit (Ping timeout: 245 seconds)
19:34:24*xet7 quit (Quit: Leaving)
19:43:40*libman quit (Quit: Leaving.)
19:43:54*libman joined #nim
19:46:54*cheatfate joined #nim
19:47:05*nsf quit (Quit: WeeChat 1.6)
19:51:05*azur_kind joined #nim
20:02:00*cheatfate quit (Ping timeout: 260 seconds)
20:15:16*xet7 joined #nim
20:17:11*dmi00 joined #nim
20:51:36*Trustable joined #nim
20:52:38*azur_kind quit (Remote host closed the connection)
21:22:10*xet7 quit (Quit: Leaving)
21:23:03*cheatfate joined #nim
21:24:53*Jesin quit (Ping timeout: 248 seconds)
21:31:20*vlad1777d joined #nim
21:34:13*abeaumont quit (Remote host closed the connection)
21:46:22*bjz joined #nim
21:49:55*libman quit (Quit: Leaving.)
21:50:09*libman joined #nim
21:50:11*libman left #nim (#nim)
21:57:08*gokr quit (Ping timeout: 245 seconds)
22:01:45*yglukhov quit (Remote host closed the connection)
22:04:59*gokr joined #nim
22:16:12*yglukhov joined #nim
22:20:53*yglukhov quit (Ping timeout: 260 seconds)
23:24:22*Jesin joined #nim
23:29:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:33:11*bjz joined #nim
23:50:44*Trustable quit (Remote host closed the connection)