00:23:05 | * | leorize[m]1 joined #nim |
00:26:56 | * | kinkinkijkin quit (Remote host closed the connection) |
01:24:11 | * | abm quit (Read error: Connection reset by peer) |
01:26:17 | * | apahl quit (Ping timeout: 260 seconds) |
01:28:00 | * | apahl joined #nim |
01:34:06 | FromGitter | <Knaque> Would it be hypothetically possible to write a Minecraft server in Nim? Genuinely curious. |
01:34:23 | leorize | yes |
01:45:12 | * | zedeus quit (Ping timeout: 260 seconds) |
01:47:02 | * | zedeus joined #nim |
01:58:28 | * | kotrcka joined #nim |
02:05:22 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:07:28 | * | muffindrake joined #nim |
02:23:39 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:02:22 | * | bacterio quit (Ping timeout: 265 seconds) |
03:04:11 | * | muffindrake quit (Ping timeout: 272 seconds) |
03:05:41 | * | muffindrake joined #nim |
03:12:28 | * | krux02 quit (Remote host closed the connection) |
03:51:56 | * | arecacea1 quit (Remote host closed the connection) |
03:52:16 | * | arecacea1 joined #nim |
04:01:35 | * | gour joined #nim |
04:05:17 | * | Adeon joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:47 | * | supakeen joined #nim |
04:21:21 | Prestige | Are there/where are the docs regarding circular dependencies? |
04:26:38 | * | thomasross quit (Ping timeout: 272 seconds) |
05:05:06 | * | mmohammadi9812 joined #nim |
05:24:12 | * | arecacea1 quit (Remote host closed the connection) |
05:24:45 | * | arecacea1 joined #nim |
05:34:13 | * | solitudesf joined #nim |
05:40:36 | * | kinkinkijkin joined #nim |
05:44:41 | * | kinkinkijkin quit (Remote host closed the connection) |
05:45:11 | * | kinkinkijkin joined #nim |
06:07:55 | * | letto quit (Remote host closed the connection) |
06:10:03 | * | letto joined #nim |
06:56:43 | * | vicfred quit (Remote host closed the connection) |
06:57:06 | * | vicfred joined #nim |
07:21:59 | * | tane_ joined #nim |
07:24:49 | * | narimiran joined #nim |
07:34:46 | * | shad0w_ joined #nim |
07:35:19 | shad0w_ | top of the mornin, my nim people. |
07:40:34 | supakeen | Morning! |
07:42:48 | supakeen | I'm looking for some nicer way to yield from another iterator than this: https://bpa.st/444A |
07:43:27 | supakeen | Not that this is dramatic. |
08:12:47 | * | mmohammadi98128 joined #nim |
08:12:59 | * | mmohammadi98128 quit (Client Quit) |
08:13:03 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
08:13:46 | * | mmohammadi9812 joined #nim |
08:17:56 | * | arecacea1 quit (Remote host closed the connection) |
08:18:43 | * | arecacea1 joined #nim |
08:22:52 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
08:27:10 | * | mmohammadi9812 joined #nim |
08:40:23 | shad0w_ | i think i lack some insight to what's happening here |
08:40:50 | shad0w_ | i did `var z: seq[2..10]` |
08:42:22 | shad0w_ | i wanted to make it a sequence that can contain any number of values, but constrained to 2..10, both included |
08:43:23 | shad0w_ | but i get a type mismatch when i do try to insert them |
08:44:08 | shad0w_ | what's happened here? |
08:44:13 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:46:54 | narimiran | shad0w_: do `type R = range[2..10]`, and then insert an interger with `s.add(R 5)` |
08:51:33 | shad0w_ | narimiran: that would tell me that range[2..10] is a type in itself ? |
08:58:13 | * | superbia1 joined #nim |
09:00:46 | * | newUser joined #nim |
09:01:00 | * | superbia quit (Ping timeout: 265 seconds) |
09:04:33 | newUser | shad0w_: like this? https://play.nim-lang.org/#ix=2yM8 |
09:11:23 | shad0w_ | newUser: yes |
09:11:31 | shad0w_ | but not in a loop |
09:11:48 | newUser | loop is only for example |
09:11:51 | shad0w_ | when i try to do `var z: seq[2..20]` |
09:12:03 | shad0w_ | and then do z = @[2,3,4,5] |
09:12:08 | shad0w_ | it's an error. |
09:12:24 | shad0w_ | if i do z = @[range[2..10]] |
09:12:27 | shad0w_ | it's still an error |
09:16:23 | * | shad0w_ quit (Remote host closed the connection) |
09:16:53 | * | shad0w_ joined #nim |
09:19:23 | newUser | shad0w_: I have only a loop solution: https://play.nim-lang.org/#ix=2yMm |
09:20:12 | newUser | z = @[2,3,4,5] z is not the same type... |
09:21:13 | narimiran | shad0w_: do as i said |
09:21:18 | narimiran | shad0w_: https://play.nim-lang.org/#ix=2yMn |
09:22:47 | newUser | narimiran: so the first value must be an R...? |
09:22:58 | narimiran | newUser: yes |
09:23:02 | newUser | cool |
09:23:32 | narimiran | newUser: and then all other's are R too, because seq is homogeneous container |
09:26:37 | * | mmohammadi98121 joined #nim |
09:27:44 | * | Trustable joined #nim |
09:27:45 | * | mmohammadi9812 quit (Ping timeout: 246 seconds) |
09:27:45 | * | mmohammadi98121 is now known as mmohammadi9812 |
09:28:12 | * | shad0w_ quit (Remote host closed the connection) |
09:32:22 | newUser | narimiran: I can calc with the R type.... |
09:32:38 | newUser | https://play.nim-lang.org/#ix=2yMp |
09:36:43 | * | mmohammadi98124 joined #nim |
09:39:34 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
09:39:35 | * | mmohammadi98124 is now known as mmohammadi9812 |
09:41:57 | newUser | bye. |
09:42:02 | * | newUser quit (Remote host closed the connection) |
09:45:16 | * | Trustable quit (Remote host closed the connection) |
09:46:30 | * | Trustable joined #nim |
09:47:15 | * | Vladar joined #nim |
09:57:33 | * | solitudesf quit (Read error: Connection reset by peer) |
09:58:11 | * | solitudesf joined #nim |
10:19:34 | * | kotrcka quit (Quit: Konversation terminated!) |
10:19:47 | * | mmohammadi9812 quit (Ping timeout: 240 seconds) |
10:39:09 | * | krux02 joined #nim |
10:52:30 | * | crem quit (Ping timeout: 244 seconds) |
11:35:27 | * | gour left #nim ("Leaving") |
11:47:23 | * | Trustable quit (Remote host closed the connection) |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:45 | * | supakeen joined #nim |
12:11:24 | * | bra-ket joined #nim |
12:13:27 | * | zyklon quit (Ping timeout: 240 seconds) |
12:21:04 | * | waleee-cl joined #nim |
12:41:39 | * | mmohammadi9812 joined #nim |
12:49:56 | * | arecacea1 quit (Remote host closed the connection) |
12:50:37 | * | arecacea1 joined #nim |
13:09:19 | * | gmaggior joined #nim |
13:11:29 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
13:12:41 | * | mmohammadi9812 joined #nim |
13:14:48 | * | VijayMarupudi[m] joined #nim |
13:17:53 | * | shad0w_ joined #nim |
13:28:07 | * | mmohammadi98120 joined #nim |
13:28:16 | * | mmohammadi9812 quit (Ping timeout: 246 seconds) |
13:28:17 | * | mmohammadi98120 is now known as mmohammadi9812 |
13:37:13 | * | reversem3 quit (*.net *.split) |
13:41:20 | * | reversem3 joined #nim |
13:42:05 | * | FromDiscord quit (Remote host closed the connection) |
13:42:28 | * | FromDiscord joined #nim |
13:42:48 | FromDiscord | <Yardanico> 123 |
13:43:09 | FromDiscord | <Rika> 321 |
13:58:51 | * | newUser joined #nim |
13:59:46 | newUser | hi, I'm playing aaround with sprintf, but it will not work: https://play.nim-lang.org/#ix=2yNy Some hints? |
14:02:46 | Prestige | newUser: I'm not familiar with the function, but it looks like you're passing 3 params into a 2 param function |
14:04:04 | newUser | varargs |
14:06:15 | Prestige | also the cstring starts as nil I believe |
14:08:53 | FromDiscord | <exelotl> yeah, that's the problem ^ |
14:09:11 | newUser | ? what to change? |
14:09:33 | newUser | res1: cstring = "" |
14:09:52 | Prestige | seems to fail as well |
14:10:11 | leorize | you need to allocate the needed memory |
14:10:34 | FromDiscord | <exelotl> example: https://play.nim-lang.org/#ix=2yNG |
14:10:52 | Prestige | nice |
14:10:56 | newUser | thx |
14:11:05 | FromDiscord | <Yardanico> @newUser btw, why not strformat? |
14:11:32 | newUser | only for examples... played with printf too |
14:11:51 | newUser | proc printf(format: cstring): cint {.importc, varargs, header: "stdio.h", discardable.} |
14:12:03 | newUser | works (from book) |
14:12:54 | leorize | note that you can also use newString() to allocate a buffer |
14:13:25 | FromDiscord | <exelotl> yep, or alloc() |
14:13:53 | FromDiscord | <exelotl> is probably more suitable for dealing with cstrings right? |
14:13:57 | Prestige | I feel like newString should be mentioned in the cstring section |
14:14:17 | newUser | please can you show it, thx |
14:14:21 | leorize[m] | it depends on what you want to do with that cstring after |
14:14:26 | Prestige | https://nim-lang.org/docs/system.html#newString%2CNatural |
14:16:16 | newUser | https://play.nim-lang.org/#ix=2yNH |
14:16:37 | Prestige | nice |
14:17:03 | FromDiscord | <exelotl> also, be careful with sprintf - if you don't allocate a large enough buffer it will write past the end (buffer overflow) |
14:17:09 | newUser | ha, need more newString(20) |
14:17:19 | Prestige | well 11 in that case but yeah |
14:17:38 | FromDiscord | <exelotl> recommend to use `snprintf` instead of `sprintf` in most cases |
14:17:38 | newUser | ok, thx a lot. bye. |
14:17:49 | * | newUser quit (Remote host closed the connection) |
14:18:05 | leorize[m] | https://play.nim-lang.org/#ix=2yNI |
14:18:36 | leorize[m] | looks like I was a bit late, but the above is the idiom used for interfacing with C libraries in nim |
14:33:49 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
14:37:09 | * | mmohammadi9812 joined #nim |
14:40:25 | * | mmohammadi98128 joined #nim |
14:41:12 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
14:41:12 | * | mmohammadi98128 is now known as mmohammadi9812 |
14:52:31 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2yO9 |
14:54:27 | FromDiscord | <haxscramper> you can create string and set concrete bytes using `str[idx] = cast[char](youValue)` |
14:58:03 | FromDiscord | <haxscramper> For byte ranges maybe something like https://play.nim-lang.org/#ix=2yOc |
15:01:58 | * | bung_ quit (Quit: Lost terminal) |
15:20:51 | FromDiscord | <Yardanico> @krisppurg i think streams would be fitting for your usecase |
15:24:18 | FromDiscord | <haxscramper> Is there a way to get something like address (basically I just need `int` uniquely associated with each object) in `NimScript`? In regular code I can just do `cast[int](unsafeAddr entry)` but that is not valid in `NimScript` |
15:26:31 | FromDiscord | <Rika> hash |
15:27:11 | FromDiscord | <haxscramper> for any object, not just ones that have `hash` defined. |
15:27:57 | FromDiscord | <haxscramper> Although this should work in most cases |
15:28:14 | FromDiscord | <krisppurg> hm |
15:52:02 | * | bacterio joined #nim |
16:23:54 | * | haxscramper joined #nim |
16:35:37 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
16:38:02 | * | mmohammadi9812 joined #nim |
16:40:50 | FromDiscord | <krisppurg> @Yardanico thank you. |
16:41:22 | FromDiscord | <Yardanico> @haxscramper i think nimscript has limited support for addr |
16:41:42 | FromDiscord | <krisppurg> I think I'm good to go for voice implementing. |
16:41:53 | FromDiscord | <krisppurg> (edit) 'for' => 'with' |
16:43:00 | FromDiscord | <haxscramper> > i think nimscript has limited support for addr↵@Yardanico I just need some "any obect to int" mapping, preferably unique. hash covers some cases, but I need to make it work out of the box for any type with zero configuration. |
17:06:20 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
17:19:43 | Prestige | Can I not cast an OrderedHashSet to a HashSet? |
17:20:01 | FromDiscord | <lqdev> no |
17:20:10 | FromDiscord | <lqdev> they're not binary-compatible |
17:20:22 | Prestige | ah ok |
17:20:57 | Zevv | well, you *can* cast them |
17:23:21 | Prestige | looks like I won't be able to use union either. Damn |
17:49:22 | * | mmohammadi9812 joined #nim |
17:55:46 | * | vicfred quit (Quit: Leaving) |
18:03:18 | * | thomasross joined #nim |
18:15:27 | * | enthus1ast quit (Ping timeout: 260 seconds) |
18:22:04 | * | NimBot joined #nim |
18:25:03 | disruptek | https://arstechnica.com/information-technology/2020/09/how-a-hacker-turned-a-250-coffee-maker-into-ransom-machine/ -- wanna have nim make your coffee? |
18:26:28 | disruptek | prestige: dude. |
18:27:04 | Prestige | RIP coffee |
18:27:56 | disruptek | what about this idea: the chat client uses irc to transmit text, discord to transmit code pastes, and telegram to send cat pics. |
18:28:59 | * | Trustable joined #nim |
18:29:16 | * | enthus1ast joined #nim |
18:30:34 | disruptek | who's with me? |
18:32:21 | disruptek | c'mon, i need a win today. i was sitting on a bench drinking coffee and someone dropped $0.45 into me cup. you know it's bad when randos think you're homeless. |
18:32:51 | disruptek | i mean, i did sleep in my car last night, so, i dunno, "thanks a lot, buddy." |
18:35:05 | shad0w_ | disruptek: lmao. you alright there buddy |
18:36:20 | shad0w_ | newbie alert. i successfully used iterators(the ones you write with iterator keyword) in nim for the first time. |
18:36:36 | shad0w_ | used it to solve a project euler problem : D |
18:36:49 | disruptek | well, you know me... i like to llay it fast and loose. or, i like to play it fast and lose. i think they both apply. |
18:38:36 | disruptek | i managed to finagle a car out of storage, but i burnt up the voltage regulator due to my insatiable appetite for risk. |
18:39:01 | Prestige | I wish there was a `first` proc for sequences, that works like filter but returns only the first match. |
18:39:28 | disruptek | maybe any() .discardable |
18:39:51 | disruptek | first() makes more sense though. |
18:40:01 | Prestige | Not sure what you mean there (since any returns a bool) |
18:40:09 | disruptek | isn't there something from sequtils? |
18:40:17 | Prestige | not seeing anything |
18:40:49 | shad0w_ | hey. i used the type int for my function signature |
18:41:05 | disruptek | the wut |
18:41:11 | shad0w_ | then i passed it a huge number, say 100000000000 |
18:41:43 | shad0w_ | compiler said the number's type is 'i64 and my function parameter's type is int |
18:41:59 | shad0w_ | i thought int's defaulted to 64 bits ? |
18:47:43 | disruptek | int is the platform's int. if you are going to pass 64bit integers regardless of platform, it's wise to specify the size in the proc. |
18:58:46 | shad0w_ | but if my platform has 64 bit ints ? |
18:59:14 | shad0w_ | int defaults*, it would still err cause i am passing a literal ? |
19:00:30 | Yardanico | shad0w_: nim is made to create cross-platform code |
19:00:37 | Yardanico | and cross-architecture |
19:00:47 | Yardanico | so in cases like that you have to specify that it's int64 explicitly |
19:01:35 | Yardanico | so that your program will work when compiled for 32-bit architectures |
19:02:04 | shad0w_ | Yardanico: gotcha. |
19:02:28 | Yardanico | by default nim stdlib and most nim programs use "int" for somewhat small numbers so they're the most efficient for their platform |
19:02:33 | Yardanico | 4 bytes on 32-bit, 8 bytes on 64-bit |
19:02:50 | Yardanico | but if you know that your number might not fit in int32, you'll probably have to use uint32 or int64 |
19:03:05 | * | hnOsmium0001 joined #nim |
19:07:01 | shad0w_ | unit will overflow with a wrap around and int64 overflow will produce a compiler error right ? |
19:07:12 | shad0w_ | uint* |
19:07:19 | * | kenran joined #nim |
19:16:13 | * | zedeus quit (Quit: zedeus) |
19:17:32 | Yardanico | shad0w_: uhh, no. nim has under/overflow checks enabled in debug and -d:release |
19:18:04 | Yardanico | and procs like parseUint will error if the number is out of the needed range |
19:18:29 | * | zedeus joined #nim |
19:18:40 | Yardanico | but yes, uint operations _will_ wrap around |
19:18:44 | Yardanico | "Unsigned operations all wrap around; they cannot lead to over- or underflow errors." |
19:21:48 | disruptek | realize that it's because you've created a constant that can only be 64bit. |
19:21:59 | disruptek | now apologize. |
19:38:02 | * | kenran quit (Ping timeout: 256 seconds) |
19:45:50 | * | a_chou joined #nim |
19:49:19 | * | vicfred joined #nim |
19:50:14 | supakeen | I'm missing `yield from`. |
19:51:04 | Yardanico | nim iterators are inline by default anyway |
19:52:17 | supakeen | https://bpa.st/444A just trying to make this (example) a bit 'prettier' |
19:52:57 | Yardanico | can't you make a template for that? :P |
19:53:12 | supakeen | of course i can but but but |
19:53:15 | Yardanico | but wat? |
19:53:49 | supakeen | nothing, just wondering why i didn't grab a template in the first place :) |
20:00:11 | * | shad0w_ quit (Ping timeout: 246 seconds) |
20:14:49 | * | narimiran quit (Quit: leaving) |
20:15:33 | * | lritter joined #nim |
20:20:15 | FromDiscord | <lqdev> if i get a parameter mismatch at position 0 when using concepts, does that mean that the return type doesn't match? |
20:21:44 | FromDiscord | <lqdev> no, doesn't seem like it |
20:24:39 | FromDiscord | <Avatarfighter> Just curious if I wanted to can I build a 16bit binary |
20:25:00 | FromDiscord | <Avatarfighter> i probably can actually I’ll figure it out lol |
20:25:33 | Yardanico | well you might be able to |
20:25:38 | Yardanico | with --os:standalone or --os:any |
20:26:30 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L224\ |
20:26:31 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L224 |
20:26:39 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L225 |
20:27:40 | Yardanico | so you will probably need to patch some stuff but it's certainly doable |
20:32:18 | FromDiscord | <lqdev> tfw concepts are having a stroke |
20:34:02 | Yardanico | use views instead (but don't tell anyone) |
20:34:07 | Yardanico | jk |
20:34:19 | Yardanico | and I meant https://nim-lang.github.io/Nim/manual_experimental.html#view-types |
20:35:13 | FromDiscord | <lqdev> yard are you asleep |
20:35:23 | Yardanico | no |
20:35:23 | FromDiscord | <lqdev> i said _concepts_ |
20:35:25 | Yardanico | yes |
20:35:28 | Yardanico | I know |
20:35:40 | FromDiscord | <lqdev> concepts vs views |
20:35:46 | Yardanico | i just wanted to mention views randomly but wanted to hide it under the context of concepts |
20:35:46 | FromDiscord | <lqdev> you're a compiler dev. |
20:35:53 | Yardanico | no |
20:35:55 | FromDiscord | <lqdev> you should know the difference. |
20:36:00 | FromDiscord | <lqdev> even *I*, a mere mortal know. |
20:36:20 | Yardanico | i do know the difference |
20:36:26 | Yardanico | I just wanted to mention views randomly as I said |
20:43:12 | * | Vladar quit (Quit: Leaving) |
20:56:56 | * | gmaggior quit (Quit: Leaving) |
21:11:12 | * | ForumUpdaterBot quit (Remote host closed the connection) |
21:11:19 | * | ForumUpdaterBot joined #nim |
21:24:37 | * | mmohammadi9812 quit (Quit: I quit (╯°□°)╯︵ ┻━┻) |
21:46:58 | disruptek | based purely on the stank of these pants, i can authoritatively state, that i will not be meeting the love of my life in the next 17 days. |
21:47:34 | disruptek | #weekendblues |
21:47:49 | disruptek | #pants |
21:47:57 | disruptek | #stank |
21:48:42 | disruptek | #covid14daygimmesomecreditffs |
21:49:07 | * | Trustable quit (Remote host closed the connection) |
21:50:15 | FromDiscord | <acek7> Do you import or include something like fidget? |
21:50:44 | disruptek | but seriously, how many of you have shaved with one hand, holding a flashlight in the other to illuminate your face in the reflection of a toilet bowl? |
21:51:11 | disruptek | you import fidget. |
21:51:46 | disruptek | include is like a parser instruction; it literally transposes the referenced code into place. |
21:52:00 | FromDiscord | <Elegant Beef> You almost always import |
21:52:11 | FromDiscord | <Elegant Beef> Unless you know you want to include |
21:52:31 | disruptek | shut up beef, i never do. |
21:52:45 | disruptek | no one here is gonna pin a rotten import on me. |
21:52:52 | FromDiscord | <Elegant Beef> Lol |
21:52:57 | FromDiscord | <acek7> so from the video i seen on fidget it seems like i should just be able to import it and then put my generated code into a file save it and run it and i should atleast get a window right |
21:53:10 | FromDiscord | <Elegant Beef> Yes |
21:53:11 | FromDiscord | <acek7> lol rotten import |
21:53:55 | FromDiscord | <acek7> test.nim(3, 7) template/generic instantiation of `frame` from here↵test.nim(54, 9) template/generic instantiation of `group` from here↵test.nim(56, 5) Error: undeclared identifier: 'vector' |
21:53:59 | FromDiscord | <acek7> so whats this mean then |
21:54:10 | FromDiscord | <Elegant Beef> You're improperly using fidget, show your code |
21:54:12 | disruptek | one of you is wrong. |
21:54:22 | disruptek | obviously. |
21:54:32 | disruptek | ask me another. |
21:54:45 | FromDiscord | <Elegant Beef> You can only cross the bridge if you answer questions three |
21:56:08 | Prestige | @acek7 what is 'vector' |
21:56:19 | FromDiscord | <acek7> just a vector image |
21:56:49 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:56:51 | FromDiscord | <Elegant Beef> Also prestige did you get your recursive dep dealio understood? 😛 |
21:56:54 | disruptek | it's a mispronunciation; i'm pretty sure they mean victor. |
21:56:55 | Prestige | I mean, what's the variable? Can you show us? |
21:57:06 | FromDiscord | <Elegant Beef> Nah clarence it's clearance |
21:57:12 | Prestige | Beef: nah I never heard an answer |
21:57:20 | FromDiscord | <Elegant Beef> What were you trying to do |
21:57:27 | disruptek | clearance, where's clarence? |
21:57:37 | Prestige | I'm just curious how nim resolves circular deps |
21:57:51 | FromDiscord | <acek7> yeah hold up its just the generated code from the fidget plugin |
21:57:55 | disruptek | circulr depa are curious about nim. |
21:58:22 | FromDiscord | <Elegant Beef> You dont do circular deps 😄 |
21:58:37 | Prestige | You mean nim doesn't? |
21:58:39 | disruptek | enter include. |
21:58:47 | Yardanico | Prestige: limited support |
21:59:00 | Prestige | Yardanico: thanks - any docs on the matter? |
21:59:13 | Yardanico | first of all there's https://nim-lang.org/docs/manual_experimental.html#package-level-objects |
21:59:47 | Yardanico | and then you can do circular imports, but: consider you have module A and B, A imports B, B imports A - then code which B imports from A should be above "import B" in A |
21:59:49 | Yardanico | or something like that |
22:00:08 | disruptek | i'm making a gay version of my resume but instead of posting it on gnufangled.com it will be on gnuspangled.com. |
22:00:15 | FromDiscord | <acek7> sent a code paste, see https://play.nim-lang.org/#ix=2yRj |
22:00:44 | FromDiscord | <acek7> test.nim(3, 7) template/generic instantiation of `frame` from here↵test.nim(19, 3) Error: undeclared identifier: 'vector' |
22:00:54 | Prestige | Thanks Yardanico |
22:00:57 | Yardanico | I don't think fidget supports them yet |
22:00:59 | Yardanico | https://github.com/treeform/fidget/blob/1d3535aceb0a085176db1a458fa7bfac3f2fe6d6/examples/gradaui/gradaui.nim#L336 |
22:01:04 | FromDiscord | <acek7> im just tryna get the window to show up lol |
22:01:06 | Yardanico | ask @treeform for a definite answer :P |
22:01:28 | Yardanico | but from code search in fidget repo by "vector" I only see this in the GUI code |
22:01:28 | FromDiscord | <Elegant Beef> Did you follow the minimal demo? |
22:01:44 | FromDiscord | <Elegant Beef> I mean there is just an issue that doesnt seem to be in a draw main proc |
22:02:26 | FromDiscord | <Elegant Beef> You have to init fidget it doesnt just magically owrk |
22:02:31 | Yardanico | asd? |
22:02:34 | FromDiscord | <Elegant Beef> (edit) 'owrk' => 'work' |
22:03:11 | FromDiscord | <treeform> @acek7 sorry in Fidget, `vector` objects are not supported yet please export `vector "Logo Vector 2":` as an image. |
22:03:22 | FromDiscord | <treeform> It will pick up the image tag on the object and insert it as an image. |
22:03:40 | FromDiscord | <acek7> ah i gotcha |
22:03:53 | FromDiscord | <acek7> well atleast im getting differant errors now lol |
22:03:54 | FromDiscord | <acek7> progress |
22:03:55 | FromDiscord | <treeform> basically just add "export" as PNG to the object |
22:04:10 | FromDiscord | <treeform> by default it gives you a code to put into a proc |
22:04:17 | FromDiscord | <treeform> so you need to wrap it with window open code |
22:04:45 | FromDiscord | <treeform> Put the code that starts with frame in the same place it starts here: https://github.com/treeform/fidget#minimal-sample |
22:05:17 | * | Jjp137 quit (Ping timeout: 260 seconds) |
22:05:22 | FromDiscord | <treeform> https://gist.github.com/treeform/c466e786a257f7a2ba8ea6f66709ffbe |
22:06:13 | * | Jjp137 joined #nim |
22:11:47 | * | noonien quit (Ping timeout: 272 seconds) |
22:12:05 | FromDiscord | <acek7> @treeform Error: unhandled exception: over- or underflow [OverflowError]↵Error: execution of an external program failed: 'c:\Users\Kin\Documents\GitHub\fidget_test\test.exe ' |
22:12:11 | FromDiscord | <acek7> thats what i get now |
22:12:14 | Yardanico | don't compile with -d:release |
22:12:18 | Yardanico | or nimble build |
22:12:21 | Yardanico | just try nim c -r |
22:13:16 | FromDiscord | <acek7> still gives me the error |
22:13:23 | Yardanico | there are more lines |
22:13:24 | * | noonien joined #nim |
22:13:25 | Yardanico | above that |
22:13:29 | Yardanico | we need the whole error message please :) |
22:14:37 | FromDiscord | <acek7> sent a long message, see http://ix.io/2yRl |
22:14:55 | FromDiscord | <acek7> is that what ya mean |
22:14:56 | Yardanico | seems like your image makes flippy destroy itself |
22:15:02 | FromDiscord | <acek7> lol i got rid of it |
22:15:07 | FromDiscord | <acek7> i just have some squares now |
22:15:32 | FromDiscord | <acek7> https://media.discordapp.net/attachments/371759389889003532/759538670398079006/unknown.png |
22:17:01 | * | Jjp137 quit (Quit: Leaving) |
22:17:01 | * | a_chou quit (Ping timeout: 264 seconds) |
22:18:56 | * | Jjp137 joined #nim |
22:25:19 | FromDiscord | <treeform> is that how it supposed to look? |
22:25:46 | FromDiscord | <treeform> maybe corner radius 100 is giving it an issue |
22:25:55 | FromDiscord | <acek7> yeah im just testing stuff out |
22:25:59 | FromDiscord | <treeform> your frame is not at 0,0 |
22:26:07 | FromDiscord | <treeform> i would just change it to 0,0 in exported code |
22:26:08 | FromDiscord | <acek7> was gonna make a little mockup that looked like a website |
22:26:19 | FromDiscord | <treeform> looks like you will use openGL mode |
22:26:23 | FromDiscord | <treeform> or do you want website HTML mode? |
22:27:00 | * | Jjp137 quit (Quit: Leaving) |
22:27:09 | * | Jjp137 joined #nim |
22:27:16 | FromDiscord | <acek7> well openGL would be for like desktop right |
22:28:32 | FromDiscord | <acek7> sent a code paste, see https://play.nim-lang.org/#ix=2yRp |
22:28:34 | FromDiscord | <acek7> like that? |
22:32:53 | FromDiscord | <acek7> it is making an executable just wont open it |
22:44:25 | * | a_chou joined #nim |
22:50:47 | FromDiscord | <treeform> you need `startFidget(drawMain)` as well |
22:50:53 | FromDiscord | <treeform> https://gist.github.com/treeform/c466e786a257f7a2ba8ea6f66709ffbe |
22:50:57 | * | tane_ quit (Quit: Leaving) |
22:56:07 | FromDiscord | <Rebel> What is the correct way to use the JsonNode from ParseJson? I am scratching my head on why this is not working when it seems like it should: https://play.nim-lang.org/#ix=2yRB |
22:58:35 | * | abm joined #nim |
23:00:25 | * | Jjp137 quit (Read error: Connection reset by peer) |
23:01:33 | FromDiscord | <treeform> wow what you have there is kind of confusing, why is your json in an array? |
23:01:43 | FromDiscord | <Elegant Beef> Yea many confusing things |
23:01:54 | FromDiscord | <treeform> why `[1 .. ^1]` |
23:02:13 | FromDiscord | <Elegant Beef> This functions though |
23:02:14 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2yRH |
23:02:16 | FromDiscord | <Rebel> because I need to remove the "@" |
23:02:21 | FromDiscord | <Rebel> as the first char in the string |
23:02:40 | FromDiscord | <Elegant Beef> Not using raw string literals made it vastly harder to read what the fuck was going on 😄 |
23:03:12 | FromDiscord | <Rebel> well |
23:03:14 | FromDiscord | <Rebel> unfortunately |
23:03:16 | FromDiscord | <Rebel> that's not an option |
23:03:23 | FromDiscord | <Elegant Beef> What do you mean |
23:03:35 | FromDiscord | <Rebel> I can't change it a raw string literal |
23:03:38 | FromDiscord | <Elegant Beef> I just did |
23:03:40 | FromDiscord | <Elegant Beef> it works |
23:03:40 | FromDiscord | <Rebel> it to* |
23:03:51 | FromDiscord | <Rebel> yes you are correct |
23:03:59 | FromDiscord | <Rebel> however, in terms of the bigger picture that is not feasible |
23:04:11 | FromDiscord | <Elegant Beef> i mean it doesnt change anything eitherway |
23:04:13 | * | Jjp137 joined #nim |
23:04:19 | FromDiscord | <Elegant Beef> it just makes it vastly more clear what's going on |
23:04:25 | FromDiscord | <treeform> I tried to fix the example best I could: |
23:04:26 | FromDiscord | <treeform> https://play.nim-lang.org/#ix=2yRM |
23:04:50 | FromDiscord | <Elegant Beef> Hey no fair that's what i did 😄 |
23:05:48 | * | haxscramper quit (Remote host closed the connection) |
23:13:31 | * | npgm_ quit (Ping timeout: 256 seconds) |
23:13:32 | * | nikita` quit (Ping timeout: 256 seconds) |
23:14:01 | * | stever quit (Read error: Connection reset by peer) |
23:14:03 | * | hoek quit (Read error: Connection reset by peer) |
23:14:06 | * | nikita` joined #nim |
23:14:06 | * | nikita` quit (Excess Flood) |
23:14:15 | * | d10n-work quit (Read error: Connection reset by peer) |
23:14:21 | * | stever joined #nim |
23:14:24 | * | npgm_ joined #nim |
23:14:43 | * | nikita` joined #nim |
23:14:43 | * | nikita` quit (Excess Flood) |
23:15:00 | * | d10n-work joined #nim |
23:15:03 | * | hoek joined #nim |
23:15:14 | * | nikita` joined #nim |
23:15:14 | * | nikita` quit (Excess Flood) |
23:16:02 | * | nikita` joined #nim |
23:16:02 | * | nikita` quit (Excess Flood) |
23:16:46 | * | nikita` joined #nim |
23:16:46 | * | nikita` quit (Excess Flood) |
23:17:24 | * | nikita` joined #nim |
23:17:25 | * | nikita` quit (Excess Flood) |
23:31:34 | * | arecacea1 quit (Remote host closed the connection) |
23:32:28 | * | arecacea1 joined #nim |
23:34:12 | FromDiscord | <Rebel> finally found the problem now to fix it |
23:34:41 | FromDiscord | <Rebel> the problem is I am trying to access it with [] notation that requires the kind to be a JsonNode |