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:23 | FromGitter | <GraydenH> so probably an sdl window |
02:18:14 | FromGitter | <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:59 | FromGitter | <yglukhov> @GraydenH you should use transformations. see animations sample. |
11:29:49 | * | cheatfate joined #nim |
11:48:33 | FromGitter | <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:59 | FromGitter | <yglukhov> i dont think so. why would you need it? |
12:02:05 | * | Snircle joined #nim |
12:11:30 | FromGitter | <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:08 | corecode | so i'm trying to learn nim and use it for arm microcontroller |
12:43:27 | FromGitter | <ephja> corecode: I don't know much about it, but I found this https://github.com/glurp/nim-arm |
12:43:46 | corecode | heh that's too large of a system :) |
12:44:41 | FromGitter | <ephja> it's possible that the compilation flags are compatible |
12:47:07 | corecode | so 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:01 | FromGitter | <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:54 | corecode | specifically, 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:05 | corecode | how would i represent a peripheral? |
13:16:40 | corecode | in C it is implemented using structs, with explicit padding to place the fields at the right (relative) offsets |
13:16:42 | ftsf | \o/ got jack + midi support working in my nim modular synth thingo |
13:18:46 | * | Matthias247 joined #nim |
13:20:42 | corecode | is 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:09 | corecode | what would be an idiomatic way to access multiple fields of a hardware register (i.e. bit fields) |
13:40:48 | corecode | typical operations would be: - read complete value (uint32), then read fields separately from this copy |
13:42:58 | corecode | - assign several fields concurrently (i.e. read + masked and + or + write) |
13:43:42 | corecode | - write new value defined by several fields |
13:45:12 | FromGitter | <gogolxdong> @corecode We have two interests in common , ARM development and blockchain. |
13:46:16 | corecode | would you suggest using some sort of accessor procs that take named arguments? |
13:46:36 | corecode | gogolxdong: i'm about to quit hyperledger :) |
13:46:46 | FromGitter | <gogolxdong> why |
13:47:26 | corecode | the development is messy and i am starting my own electronics + firmware consulting company |
13:48:09 | FromGitter | <gogolxdong> Does it involve blockchain? |
13:48:34 | corecode | no :) |
13:48:48 | FromGitter | <gogolxdong> I knew Nim will bring opportunity for startup company. |
13:49:02 | corecode | i'm no startup |
13:50:24 | FromGitter | <gogolxdong> There are a lot of perspectives about blockchain, I wonder whether it is exaggerated. |
13:50:52 | FromGitter | <gogolxdong> Does it involve IoT? |
13:50:55 | corecode | for sure is |
13:51:00 | corecode | not really |
13:51:30 | corecode | i already was at an iot startup - lots of marketing hype, very few concepts that can make money |
13:51:52 | FromGitter | <gogolxdong> :) |
13:53:44 | corecode | i suggest reading bruce sterling's the eternal struggle of the internet of things |
13:54:00 | corecode | so back to the subject |
13:55:10 | cheatfate | corecode, nim supports object bitfields |
13:55:30 | cheatfate | also it supports pragma pack |
13:55:43 | FromGitter | <gogolxdong> I will, I am searching an opportunity to start my own business too. |
13:56:21 | FromGitter | <gogolxdong> Nim simplify a lot of things. |
13:57:59 | FromGitter | <gogolxdong> I acquired the technology stack of blockchain, no time to dig further. |
13:58:23 | corecode | cheatfate: yea, but i think we can do better than just using c bitfields |
13:58:59 | corecode | gogolxdong: a what? sounds like marketing speak |
14:00:19 | cheatfate | corecode, what can be better? |
14:00:55 | cheatfate | some procs like setBits(pos, value) and getBits(pos)? |
14:00:56 | FromGitter | <gogolxdong> which part |
14:01:06 | corecode | cheatfate: first, most people don't use bitfields because of C compiler difficulties (big endian vs little endian byte ordering of fields) |
14:01:27 | corecode | cheatfate: to clarify, i'm not talking about a sequence of single bits |
14:02:15 | corecode | but 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:17 | corecode | 31* |
14:02:33 | corecode | let's say you want to set all of these values concurrently |
14:02:43 | corecode | c bitfields don't allow you to do that |
14:02:55 | cheatfate | what you mean `concurrently`? |
14:03:03 | corecode | one memory write |
14:05:03 | * | couven92 joined #nim |
14:05:08 | cheatfate | corecode, you mean one operation or i can prepare such value in some variable and then make one memory write? |
14:05:24 | corecode | in the end it has to happen in one processor write |
14:05:43 | corecode | but of course you can prepare that value before |
14:06:01 | FromGitter | <gogolxdong> I am not that familiar with Nim either with blockchain in detail as you, sometimes I can only say something macroscopical. |
14:06:30 | corecode | gogolxdong: what's your blockchain technology stack? |
14:07:07 | cheatfate | corecode, so you want something like var a = {0-1: 2bit, 2-4: 3bit, 31-32: 1bit}? |
14:07:28 | FromGitter | <gogolxdong> protobuf, gRPC, PBFT etc. |
14:07:48 | FromGitter | <gogolxdong> from hyperledger. |
14:08:05 | corecode | cheatfate: i don't know that syntax |
14:08:17 | corecode | gogolxdong: lol good luck |
14:08:40 | cheatfate | corecode, there no such syntax, i'm just trying to satisfy your request |
14:09:01 | cheatfate | corecode, to set many fields in one integer |
14:09:51 | corecode | well, i was thinking of something like |
14:11:20 | corecode | myperiph.regfoo.set(bar = 3, baz = 7, enable = 1) |
14:12:17 | corecode | and regfoo's type has a set proc which translates these argument names to shifts, etc. |
14:12:55 | corecode | would that feel idiomatic? |
14:13:36 | FromGitter | <gogolxdong> I saw a video on TED,it described a promising future about blockchain which inspirited me. |
14:13:42 | cheatfate | corecode, but it looks more like bitfields structures :) |
14:13:52 | corecode | cheatfate: what does? |
14:14:31 | cheatfate | corecode, to make such set you first need to declare `bar`, `baz`, `enable` to bit positions |
14:14:42 | corecode | cheatfate: and widths, yes |
14:15:19 | cheatfate | corecode, so it looks like declare structure with bitfields |
14:15:48 | corecode | i don't understand what you are trying to tell me |
14:17:10 | cheatfate | corecode, do you know such nim construction like var a = SomeObject(objField1: 7, objField2: 3, objField3: 1)? |
14:17:11 | * | fredrik92 joined #nim |
14:17:22 | corecode | no i don't |
14:17:29 | corecode | does that exist? |
14:17:33 | cheatfate | corecode, yep |
14:18:06 | cheatfate | it exists |
14:18:17 | cheatfate | type someObject = object |
14:18:24 | cheatfate | objField1: int |
14:18:24 | * | fredrik92 quit (Client Quit) |
14:18:29 | cheatfate | ... |
14:18:40 | cheatfate | var a = someObject(objField1: 123123) |
14:19:02 | corecode | oh that |
14:19:15 | corecode | constructor |
14:20:48 | corecode | cheatfate: i'm not sure we're really communicating |
14:20:51 | * | couven92 quit (Ping timeout: 265 seconds) |
14:21:23 | cheatfate | ok |
14:21:27 | corecode | ok? |
14:22:41 | cheatfate | corecode, i dont know what to say on `i'm not sure we're really communicating` |
14:26:52 | corecode | ok. what are you telling me? is there already a way to do what i want to do? |
14:30:03 | corecode | so 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:52 | cheatfate | corecode, 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:31 | corecode | that sounds like the code would be less "clean" |
14:32:34 | corecode | more noisy |
14:32:36 | corecode | no? |
14:38:13 | cheatfate | corecode, i think you can make some kind of template for it |
14:38:27 | cheatfate | to hide usage of `stack variable` |
14:39:28 | corecode | i see what you are saying |
14:40:04 | corecode | use the constructor to set the fields, and then do an assignment |
14:40:14 | corecode | what about only setting a subset of fields? |
14:40:31 | corecode | say we have f1, f2, f3, f4, and we just want to set f1 and f3 |
14:40:40 | corecode | and keep f2 and f4 as is |
14:41:29 | corecode | the 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:43 | cheatfate | you can set only some of fields in constructor |
14:43:25 | cheatfate | var a = somevalue |
14:43:43 | cheatfate | var a = 7237237232 |
14:44:02 | cheatfate | var b = cast[ptr someObject](addr a)[] |
14:44:27 | vl409 | corecode: you should forget about bitmask and bitfields. Especially if you're targeting ARM |
14:45:23 | vl409 | ARM has UBFX SBFX instructions. So you either replicate exactly what it is as cheatfate said |
14:45:26 | corecode | vl409: you mean C bitfields? |
14:45:49 | vl409 | or use setter getter, that will be asm code |
14:46:06 | corecode | ah i see |
14:46:38 | corecode | you think the c compiler can't figure it out to use ubfx if applicable? |
14:46:58 | vl409 | I 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:39 | corecode | well c bitfields are a nuisance |
14:48:05 | corecode | and if we use setters and getters, the backend implementation can be switched as desired |
14:49:36 | * | vendethiel joined #nim |
14:50:21 | vl409 | In 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:05 | vl409 | I would however like to know the answer, too :-) (no worries - not starting any business) |
14:51:07 | corecode | first i want an idiomatic interface |
14:51:32 | corecode | clear programming interface is king |
15:04:03 | * | Guest73656[m] joined #nim |
15:08:34 | FromGitter | <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:57 | FromGitter | <gogolxdong> Not native speaker , correct me if there is something vague or offensive. |
15:30:57 | FromGitter | <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:06 | vl409 | type |
15:41:06 | vl409 | SomeObject* = object |
15:41:06 | vl409 | data {.bitsize:7.}: cuint |
15:41:06 | vl409 | w {.bitsize:1.}: cuint |
15:41:06 | vl409 | h {.bitsize:2.}: cuint |
15:41:43 | vl409 | But being new to Nim, I don't know how constructor's are written |
15:42:34 | vl409 | proc createSO*(d,w,h: cuint): SomeObject = result.w = w ; result.h = h ; result.data = d |
15:42:47 | vl409 | var a = createSO(3,0,2) |
15:43:14 | vl409 | But more importantly, I've been searching .... |
15:43:55 | vl409 | corecode: Have you seen this: https://zinc.rs/ |
15:44:21 | vl409 | and 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:22 | FromGitter | <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:56 | corecode | not 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:18 | FromGitter | <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:20 | Zaibon | Hello, I'm a newcomer to nim and I'm trying to get my head around nimble at the moment. |
17:22:41 | Zaibon | I'm facing a issue and I'm not sure if it's a bug or it's the expected behaviour. |
17:23:06 | Zaibon | so the situation. I have a package A that requires another package B |
17:23:16 | Zaibon | then I have a binary project that requires A |
17:23:36 | Zaibon | so in the nimble file of the project I only requires A |
17:23:53 | Zaibon | but when I try to compile, nimble complains that it can't find package B |
17:24:19 | Zaibon | is it normal behavior ? and I should explicitly requires all depencies of all my dependencies ?? |
17:24:45 | Zaibon | that's doesn't sound right to me. |
17:40:03 | * | perturbation quit (Ping timeout: 245 seconds) |
17:42:10 | * | perturbation joined #nim |
17:47:38 | dom96 | Zaibon: it's a bug, grab Nimble from GitHub for a fix. |
17:52:53 | Zaibon | dom96: 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:00 | yglukhov | dom96: 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) |