00:00:01 | * | zopsi quit (Quit: Oops) |
00:00:15 | * | clyybber quit (Remote host closed the connection) |
00:01:24 | * | zopsi joined #nim |
00:39:56 | * | NimBot joined #nim |
00:52:53 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:53:13 | * | njoseph joined #nim |
00:56:06 | FromDiscord | <ElegantBeef> Leorize did you have anything you wanted to share or were just interested? π |
01:12:31 | FromDiscord | <hamidb80> hey |
01:12:39 | FromDiscord | <Rika> hello |
01:12:48 | FromDiscord | <hamidb80> can i do something like that? https://media.discordapp.net/attachments/371759389889003532/837859059713572944/unknown.png |
01:12:55 | leorize[m] | cps but currently we decide to not advertise it since it's not very mature yet |
01:13:33 | FromDiscord | <hamidb80> cps? |
01:13:41 | FromDiscord | <Rika> hes not replying to you |
01:14:38 | FromDiscord | <hamidb80> can i add pragma for a block? |
01:14:58 | FromDiscord | <hamidb80> In reply to @hamidb80 "can i do something": something like this |
01:19:36 | FromDiscord | <ElegantBeef> @hamidb80 this is atleast one way of doing that https://play.nim-lang.org/#ix=3lrY |
01:19:51 | FromDiscord | <ElegantBeef> Though i dont know why you'd use a template here |
01:20:02 | FromDiscord | <ElegantBeef> It's the exact same amount of work and writing as making the extra scope |
01:23:22 | FromDiscord | <ElegantBeef> well i mean one requires `block name:` and the other requires `label name, for i in 0..10` |
01:24:06 | FromDiscord | <ElegantBeef> So it's the same amount of typing, and just is more unreadable imo |
01:24:17 | FromDiscord | <hamidb80> yeah, thank u |
01:25:07 | FromDiscord | <hamidb80> meta programming seems very interesting to me |
01:25:23 | FromDiscord | <hamidb80> I'm really excited |
01:25:24 | FromDiscord | <ElegantBeef> Yea it's a magical world, and i love it |
01:25:46 | FromDiscord | <ElegantBeef> Should explain why the pragma doesnt work, it's cause it applies to the values |
01:28:35 | FromDiscord | <ElegantBeef> Generally speaking though i'd suggest only use them when they save you either amount of written code or sanity, or both π |
01:30:03 | FromDiscord | <hamidb80> https://play.nim-lang.org/#ix=3lrZ |
01:30:12 | FromDiscord | <hamidb80> doesn't work for `while` |
01:31:12 | FromDiscord | <hamidb80> not a big deal |
01:31:27 | FromDiscord | <hamidb80> i use `block silly` instead π |
01:32:28 | FromDiscord | <ElegantBeef> Also should note macros wasnt needed just thought it was going to be |
01:33:06 | FromDiscord | <ElegantBeef> It's not great but you can get it to parse by doing `(while true: ...)` |
01:35:33 | FromDiscord | <treeform> Is there like a $ for a proc, I am making pretty printer and just want to print the proc signature ... kind of like what traceback does? |
01:37:38 | FromDiscord | <treeform> Maybe like fieldPairs but for arguments? |
01:41:53 | FromDiscord | <Revenant> sent a long message, see http://ix.io/3ls0 |
01:42:21 | FromDiscord | <Revenant> (edit) "http://ix.io/3ls0" => "http://ix.io/3ls1" |
01:44:01 | FromDiscord | <Revenant> basically, i want to log the stacktrace on ANY type of crash, no matter what. |
01:50:35 | FromDiscord | <treeform> In reply to @Revenant "hello, simple question: i": I have never done this, but maybe https://nim-lang.org/docs/segfaults.html can help? |
01:50:52 | FromDiscord | <ElegantBeef> @treeform here you go https://play.nim-lang.org/#ix=3ls6 |
01:51:20 | FromDiscord | <ElegantBeef> suppose it make sense to remove the internal echo π |
01:52:57 | FromDiscord | <Revenant> In reply to @treeform "I have never done": great find, i'll give it a go now. i also found this one: https://nim-lang.org/docs/system.html#onUnhandledException |
01:54:34 | FromDiscord | <treeform> In reply to @ElegantBeef "<@!107140179025735680> here you go": That's great thanks! I'll use it. |
01:54:45 | * | leorize quit (Quit: WeeChat 3.0) |
01:56:26 | FromDiscord | <hamidb80> i should spend more time here |
01:56:45 | FromDiscord | <ElegantBeef> I wasnt happy with that impl since it didnt show `thing` for the pointer proc so maybe this makes me happier or there is a better alternative in the macro/typeinfo/typetraits code π https://play.nim-lang.org/#ix=3ls8 |
02:00:15 | FromDiscord | <treeform> With your new version I get `cannot get child of node kind: nnkNilLit` |
02:00:36 | FromDiscord | <ElegantBeef> Hmm |
02:00:42 | FromDiscord | <treeform> So I like the prev version |
02:00:53 | FromDiscord | <ElegantBeef> "The previous version works, so it's better" π |
02:01:14 | FromDiscord | <ElegantBeef> Using it on an object i assume? |
02:02:13 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=3lsc |
02:03:06 | FromDiscord | <nuc> sent a code paste, see https://play.nim-lang.org/#ix=3lsd |
02:03:26 | FromDiscord | <ElegantBeef> to escape the `"` character |
02:03:36 | FromDiscord | <treeform> In reply to @nuc "hey guys I am": you have space between `echo` and `(` |
02:04:00 | FromDiscord | <treeform> that space tells you if you want to `echo(a,b,c)` or `echo((a,b,c))` |
02:04:05 | FromDiscord | <nuc> @treeform oh yes that was it! |
02:04:17 | FromDiscord | <ElegantBeef> Ah didnt notice the accidental tuple constructor |
02:04:21 | FromDiscord | <nuc> That's why the output wasnt escaped I guess |
02:04:39 | FromDiscord | <ElegantBeef> command syntax is nice but a bit of a noob trap π |
02:05:21 | FromDiscord | <nuc> Seems I found an easteregg prematurely |
02:05:31 | FromDiscord | <nuc> xp |
02:05:32 | FromDiscord | <treeform> π |
02:06:02 | FromDiscord | <ElegantBeef> To be fair it happens quite a bit cause it compiles without warning π |
02:06:27 | FromDiscord | <ElegantBeef> not that it should warn π |
02:06:44 | FromDiscord | <nuc> maybe there should be a noob flag for the compiler π |
02:07:01 | FromDiscord | <Revenant> @treeform sadly, import the `segfaults` module doesn't do the trick :/ |
02:07:13 | FromDiscord | <Revenant> (edit) "import" => "importing" |
02:07:46 | FromDiscord | <treeform> was worth a try, you need to catch segfault on your own some how, its different per OS. |
02:08:03 | FromDiscord | <Revenant> well... yeah... that's what i don't want to do π |
02:08:49 | FromDiscord | <ElegantBeef> Do we have a "noob traps for nim" article? |
02:11:36 | FromDiscord | <Avatarfighter> Probably not :p |
02:18:32 | * | NimBot joined #nim |
02:37:25 | FromDiscord | <exelotl> speaking of noob-friendliness, I noticed nim devel explicitly warns me that my program may be slow when I compile without -d:release or -d:danger |
02:38:59 | FromDiscord | <ElegantBeef> Yep, fixes the whole "Nim is slower than python" |
03:26:28 | * | rockcavera quit (Read error: Connection reset by peer) |
03:26:54 | * | rockcavera joined #nim |
03:35:47 | FromGitter | <offbeat-stuff> Hi, new to posix functions, trying to write my own execCmd using posix functions, |
03:35:54 | FromGitter | <offbeat-stuff> This is what i came with |
03:35:55 | FromGitter | <offbeat-stuff> https://play.nim-lang.org/#ix=3lsq |
03:36:21 | FromGitter | <offbeat-stuff> goes into error at this line notneg dup2(c2p[w],stdout.getFileHandle()) |
03:43:10 | * | Dreamer3 joined #nim |
03:43:28 | Dreamer3 | could someone help me understand what this line does https://github.com/nim-lang/Nim/blob/devel/lib/pure/asynchttpserver.nim#L284 |
03:44:30 | Dreamer3 | how does the socket know exactly how much data will be received in a given timeframe if the connection is still open? |
03:44:58 | FromDiscord | <ElegantBeef> I assume it'll read async until the length has been hit at which point it'll return the body |
03:45:38 | Dreamer3 | but it might also return more or less data? |
03:46:04 | FromDiscord | <ElegantBeef> Without timeout it'll read until it hits it |
03:46:19 | Dreamer3 | ok, so never less then, unless perhaps the connection dies |
03:46:32 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/asyncdispatch.html#recv%2CAsyncFD%2Cint |
03:46:38 | Dreamer3 | but how does it guard against more? couldn't it return and then the moment it returns more data is sent? |
03:46:57 | * | Dreamer3 reading |
03:47:25 | Dreamer3 | "a part of the data has been read, or the socket has disconnected" that's the part i don't get |
03:48:04 | Dreamer3 | is the socket is open why would it ever return partial data? |
03:48:19 | FromDiscord | <ElegantBeef> Cause you tell it to return partial data |
03:48:58 | FromDiscord | <ElegantBeef> It's akin to using the `file.read(buffer, size)` procedure it'll move the cursor over X bytes and hold it there until called again |
03:49:01 | FromDiscord | <ElegantBeef> Atleast as i understand it |
03:49:24 | * | spiderstew_ joined #nim |
03:50:05 | FromDiscord | <joshgoebel> the only flag i see is SafeDisconn... how do you tell it to return partial data? I mean I read "up to" right there, but I don't get WHAT determines whether the full cotnent or partial is returns if you arent' giving it a delay. |
03:50:08 | * | spiderstew quit (Ping timeout: 246 seconds) |
03:50:26 | FromDiscord | <ElegantBeef> the returned data isnt the requested size |
03:50:27 | leorize[m] | @offbeat-stuff the best way to debug is to print errno and strerror(errno) after a syscall failure |
03:50:42 | * | Dreamer3 quit (Quit: Leaving...) |
03:51:38 | FromDiscord | <joshgoebel> _goes to read that source_ |
03:58:01 | FromDiscord | <joshgoebel> wish i knew what OSErrorCode(-1) was |
03:59:00 | FromDiscord | <ElegantBeef> Converting the `-1` to the OSErrorCode |
03:59:08 | FromDiscord | <ElegantBeef> IE "fail" afaik |
03:59:24 | FromGitter | <offbeat-stuff> I get 14 |
03:59:48 | FromGitter | <offbeat-stuff> invalid file descriptor |
04:00:40 | FromDiscord | <joshgoebel> are you talking to me? |
04:02:30 | FromGitter | <offbeat-stuff> actually anyone wanting to help |
04:02:37 | FromDiscord | <lan> In reply to @hamidb80 "meta programming seems very": This reminds me, isn't C metaprogramming as well? given that, well, it compiled to assembly? |
04:02:52 | FromGitter | <offbeat-stuff> But following leorize suggestion |
04:04:22 | FromDiscord | <ElegantBeef> That's not what is meant by meta programming π |
04:05:39 | leorize[m] | @offbeat-stuff are you sure that your stdout fd is correct? |
04:09:33 | FromGitter | <offbeat-stuff> for the most part I'm trying to understand the code so I only have a vague sense of the code. SO YEAH NOT REALLY |
04:13:24 | FromGitter | <offbeat-stuff> echo c2p[w], " -> ",stdout.getFileHandle() |
04:13:31 | FromGitter | <offbeat-stuff> outputs 6 -> 1 |
04:22:08 | FromGitter | <offbeat-stuff> Now code is https://play.nim-lang.org/#ix=3lsz |
04:22:14 | FromGitter | <offbeat-stuff> Changed a few things |
04:23:04 | FromGitter | <offbeat-stuff> Okay now it errors around execlp |
04:24:00 | FromGitter | <offbeat-stuff> actually at dup2 for stdout returns 1 |
04:25:30 | FromGitter | <offbeat-stuff> actually thats okay thats stdout there |
04:26:08 | * | leorize joined #nim |
04:26:24 | leorize | your buffering code is incorrect |
04:26:51 | FromGitter | <offbeat-stuff> wdym |
04:26:56 | leorize | read() requires an allocated buffer, it does not allocate a buffer for you |
04:27:11 | FromGitter | <offbeat-stuff> yeah the buffer is where errno shows up 14 |
04:27:29 | FromGitter | <offbeat-stuff> I mean the read function |
04:27:46 | leorize | cstring default is `nil`, which is not allocated |
04:27:51 | leorize[m] | which means it starts in the state of... not allocated |
04:27:51 | leorize[m] | or `nil` |
04:28:06 | leorize | oh now my matrix catches up |
04:28:10 | FromDiscord | <ElegantBeef> Swaps to matrix from irc inbetween two messages π |
04:28:25 | FromGitter | <offbeat-stuff> and to alloc it just use alloc |
04:28:28 | FromDiscord | <ElegantBeef> looked like you were pretty good a typing for a second π |
04:28:42 | leorize[m] | we have a neater trick in Nim for this |
04:29:26 | FromGitter | <offbeat-stuff> new code https://play.nim-lang.org/#ix=3lsA |
04:30:01 | FromGitter | <offbeat-stuff> okay now it just doesn't move |
04:30:02 | FromGitter | <offbeat-stuff> its stuck |
04:30:11 | FromGitter | <offbeat-stuff> in the while loop |
04:33:03 | FromGitter | <offbeat-stuff> finally https://play.nim-lang.org/#ix=3lsC |
04:33:06 | FromGitter | <offbeat-stuff> code that works |
04:33:15 | * | thomasross quit (Ping timeout: 268 seconds) |
04:33:38 | leorize[m] | https://play.nim-lang.org/#ix=3lsD |
04:33:47 | leorize[m] | ^ a better, GC-ed buffering system |
04:33:55 | leorize[m] | it's still slow, you can make it faster |
04:34:01 | leorize[m] | but I'll let you try that yourself |
04:34:47 | FromGitter | <offbeat-stuff> thanks |
04:35:06 | FromGitter | <offbeat-stuff> also setStdioUnbuffered does that make any difference |
04:35:11 | FromDiscord | <ElegantBeef> Makes me happy to see that what i imagined the solution would be was the solution π |
04:35:37 | leorize[m] | https://play.nim-lang.org/#ix=3lsE <- fixed a bit |
04:36:01 | leorize[m] | and you don't need setStdioUnbuffered |
04:46:42 | FromGitter | <offbeat-stuff> I dont see your changes |
04:46:50 | FromGitter | <offbeat-stuff> What changes did you make |
04:47:16 | leorize | I changed the buffer handling a bit |
04:51:51 | FromGitter | <offbeat-stuff> okay |
04:51:56 | FromGitter | <offbeat-stuff> thanks |
05:13:09 | * | rockcavera quit (*.net *.split) |
05:13:10 | * | aeverr quit (*.net *.split) |
05:13:10 | * | dv^_^ quit (*.net *.split) |
05:13:10 | * | astronavt quit (*.net *.split) |
05:13:11 | * | sknebel quit (*.net *.split) |
05:13:11 | * | ddevault quit (*.net *.split) |
05:13:24 | * | federico3 quit (*.net *.split) |
05:23:55 | * | aeverr_ joined #nim |
05:23:55 | * | rockcavera joined #nim |
05:23:55 | * | dv^_^ joined #nim |
05:23:55 | * | astronavt joined #nim |
05:23:55 | * | sknebel joined #nim |
05:23:55 | * | ddevault joined #nim |
05:23:55 | * | federico3 joined #nim |
05:40:23 | * | rockcavera quit (Remote host closed the connection) |
06:32:25 | ForumUpdaterBot | New thread by Neodim: CRC16 checksum calculation, see https://forum.nim-lang.org/t/7896 |
07:06:02 | FromDiscord | <Varriount> Hm. Is krux02 still around? |
07:06:25 | FromDiscord | <ElegantBeef> Occasionally |
07:06:29 | FromDiscord | <ElegantBeef> If you ask nicely |
07:41:44 | FromDiscord | <jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3lt3 |
07:43:19 | FromDiscord | <ElegantBeef> `while not file.endOfFile: doSomething(f.readByte)` |
07:46:06 | FromDiscord | <jtiai> Wonder why readByte is not in the docs... |
07:46:45 | FromDiscord | <ElegantBeef> Is it an actual procedure |
07:46:46 | FromDiscord | <ElegantBeef> (edit) "procedure" => "procedure?" |
07:48:34 | * | crem quit (Quit: WeeChat 2.9) |
07:49:09 | FromDiscord | <jtiai> I don't know. That's what I'm asking since can't find anything related to reading single byte from file. |
07:49:23 | FromDiscord | <jtiai> there is `readBytes` but I can't use that. |
07:49:37 | FromDiscord | <ElegantBeef> `file.readChar.byte` |
07:49:59 | FromDiscord | <Recruit_main707> can't you do read(1)? |
07:51:47 | FromDiscord | <ElegantBeef> You could also use the streams api and open a filestream then use `readUint8` |
07:52:12 | * | crem joined #nim |
07:55:51 | FromDiscord | <jtiai> Streams API works nicely. |
07:56:29 | FromDiscord | <jtiai> Now my emulator can read rom files... |
09:30:46 | * | ligist[m] quit (*.net *.split) |
09:30:46 | * | m33[m] quit (*.net *.split) |
09:30:46 | * | JStoker quit (*.net *.split) |
09:31:35 | * | vicfred quit (Quit: Leaving) |
09:37:05 | * | m33[m] joined #nim |
09:37:05 | * | ligist[m] joined #nim |
09:37:05 | * | JStoker joined #nim |
09:37:51 | * | JStoker quit (Ping timeout: 245 seconds) |
09:38:21 | * | JStoker joined #nim |
10:27:06 | * | lritter joined #nim |
10:48:19 | * | Vladar joined #nim |
11:43:16 | * | natrys joined #nim |
11:47:29 | ForumUpdaterBot | New thread by Masiarek2: Sorting enum - by identifier and int?, see https://forum.nim-lang.org/t/7897 |
12:07:36 | ForumUpdaterBot | New thread by Akito: Suddenly getting infinite genericDeepCopy recursion, see https://forum.nim-lang.org/t/7898 |
12:45:38 | FromDiscord | <GreenFork> I have a global `var config` object which also has strings in it. I define it during runtime and then I want to use it in threads. can I do so without copying this config to every thread with `--gc:arc`? Currently it complains `Error: 'startThreadedRequests' is not GC-safe as it accesses'config' which is a global using GC'ed memory` |
13:41:51 | ForumUpdaterBot | New thread by NameUndefined: Use proxy and ports httpclient, see https://forum.nim-lang.org/t/7899 |
13:47:09 | * | leorize quit (Ping timeout: 240 seconds) |
14:01:02 | * | tane joined #nim |
14:02:15 | * | icebattle quit (Ping timeout: 246 seconds) |
14:04:48 | * | leorize joined #nim |
14:17:52 | FromDiscord | <whisperdev> How does one avoid nested loops in Nim? |
14:24:11 | FromDiscord | <GreenFork> In reply to @whisperdev "How does one avoid": there's no syntactic sugar for that in standard library. but generally nested loops are fine |
14:26:22 | FromDiscord | <haxscramper> I don't think there is any way to avoid nested loops for the sake of avoiding them, but depending on your actual use case you might convert them to `template` or some form of `map` |
14:26:54 | FromDiscord | <haxscramper> `std/sugar.collect`, `std/sequtils.mapIt` etc. |
14:31:58 | ForumUpdaterBot | New thread by Rb3: Overridable operator precedence?, see https://forum.nim-lang.org/t/7900 |
14:37:36 | * | skelett quit (Quit: WeeChat 3.1) |
14:37:57 | * | skelett joined #nim |
14:44:01 | ForumUpdaterBot | New thread by Rb3: Overridable operator precedence, see https://forum.nim-lang.org/t/7901 |
14:44:32 | * | sagax joined #nim |
14:53:41 | * | natrys quit (Ping timeout: 240 seconds) |
14:54:04 | FromDiscord | <exelotl> @whisperdev you can make a custom iterator: https://play.nim-lang.org/#ix=3lv6 |
14:54:08 | * | natrys joined #nim |
14:59:06 | * | icebattle joined #nim |
15:01:27 | * | omnigoat joined #nim |
15:03:23 | * | mjsir911 quit (Remote host closed the connection) |
15:03:42 | * | mjsir911 joined #nim |
15:24:17 | giaco | just found "nim secret" and the reason behind it. But now the question is of inim shares the same weak points |
15:24:27 | giaco | s/of/if |
15:40:19 | ForumUpdaterBot | New thread by Dabod: Invalid object assignment exception instead of compile time error?, see https://forum.nim-lang.org/t/7902 |
15:40:27 | * | thomasross joined #nim |
16:00:09 | * | ShalokShalom[m] quit (Quit: Idle for 30+ days) |
16:00:10 | * | anoj[m] quit (Quit: Idle for 30+ days) |
16:02:03 | FromDiscord | <exelotl> giaco: you might want to check out the 5 minute inim talk from NimConf 2020 |
16:02:06 | FromDiscord | <exelotl> https://www.youtube.com/watch?v=Qa_9vut4TzQ&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=4 |
16:18:33 | giaco | exelotl, thanks! |
16:25:17 | FromDiscord | <zetashift> iNim is great, using it now too |
18:49:49 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=3lwj |
18:50:13 | FromDiscord | <mattrb> (edit) "https://play.nim-lang.org/#ix=3lwj" => "https://play.nim-lang.org/#ix=3lwk" |
18:51:53 | FromDiscord | <haxscramper> Cyclic imports are not supported, put mutually recursive functions in one module, or put common types in separate module |
19:02:51 | saem | this is probably very obvious, but is there a better way than using `join` to convert from a `seq[char]` to `string`? |
19:04:36 | FromDiscord | <mattrb> I know ElegantBeef showed me a way before that allowed the cyclic imports to work by placing the imports in specific places, but I didn't actually understand how that worked |
19:05:01 | FromDiscord | <mattrb> For example, I have 2 nim files that depend on each other without issue atm |
19:05:43 | FromDiscord | <mattrb> https://github.com/mattrberry/gba/blob/master/src/gba/cpu.nim#L160β΅https://github.com/mattrberry/gba/blob/master/src/gba/arm.nim#L3 |
19:14:30 | FromDiscord | <mattrb> Also in my example above, there's no mutual recursion or anything, it's just a dag. cpu.nim has some state defined in that module so interrupts.nim needs to call into that module. I can send you a reduced version of what I'm looking at if that'd help |
19:15:43 | FromDiscord | <Tavon> sent a code paste, see https://paste.rs/GFP |
19:20:27 | FromDiscord | <haxscramper> `fd` is private https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/net.nim#L148 |
19:20:53 | FromDiscord | <Tavon> Yeah but isn't {.all.} supposed to make everything public? |
19:20:53 | FromDiscord | <haxscramper> Or `{.all.}` supposed to somehow mitigate this? |
19:21:07 | FromDiscord | <Tavon> From what I can gather, it should make it public |
19:21:25 | FromDiscord | <Tavon> https://github.com/nim-lang/Nim/pull/17706 |
19:22:21 | FromDiscord | <Tavon> Oh, I just read the PR more thoroughly, I need to use `privateAccess` |
19:25:04 | FromDiscord | <Tavon> sent a code paste, see https://paste.rs/Xuy |
19:28:45 | * | rockcavera joined #nim |
19:48:06 | * | lritter quit (Ping timeout: 240 seconds) |
19:53:10 | FromDiscord | <ElegantBeef> I dont recall if seq/string growth rates are the same, but you could always cast the seq to a string saem |
19:53:46 | saem | Yeah, I doubt they are unless sticking with ascii (which I happen to be). |
19:54:15 | FromDiscord | <ElegantBeef> Uh, i mean the capacity growth rate |
19:56:13 | * | vicfred joined #nim |
19:57:06 | * | thomasross quit (Ping timeout: 240 seconds) |
19:59:29 | * | blackpawn quit (Ping timeout: 268 seconds) |
20:04:38 | FromDiscord | <ElegantBeef> Oh and @treeform my compiler work didnt pass the smell test so there is now an RFC for the whole case statement stuffs https://github.com/nim-lang/RFCs/issues/373 |
20:04:49 | FromDiscord | <ElegantBeef> So go updoot that π |
20:16:21 | FromDiscord | <madman> when i look at the nimcache i can see the `Command for C compiler: g++ -c -std=gnu++14 -funsigned-char ...`β΅is there a way to remove the `-c` flag because i want it to link as well |
20:17:48 | FromDiscord | <treeform> In reply to @ElegantBeef "Oh and <@!107140179025735680> my": doing |
20:18:53 | FromDiscord | <madman> `passL{..}` for dat linker! |
20:23:11 | FromDiscord | <ElegantBeef> or just you know `--passL:` with the Nim compiler |
20:24:54 | * | abm joined #nim |
20:26:01 | FromDiscord | <madman> its a long string |
20:26:31 | FromDiscord | <ElegantBeef> so make a nim config or nims file |
20:27:42 | FromDiscord | <madman> im trying to translate this makefile to the nim compiler https://media.discordapp.net/attachments/371759389889003532/838149705682780210/makefile |
20:30:02 | FromDiscord | <ElegantBeef> Good luck, i know nothing of make files |
20:30:18 | FromDiscord | <Nisha's alt> ~~Has someone implemented Nim with braces yet?-~~ |
20:30:44 | FromDiscord | <ElegantBeef> There was someone that made a transpiler that used braces iirc, but i dont see why you're asking π |
20:30:55 | FromDiscord | <Nisha's alt> Because braces are the best- Lol |
20:31:03 | FromDiscord | <Nisha's alt> ~~Also can i see the transpiler?-~~ |
20:32:09 | * | thomasross joined #nim |
20:33:59 | FromDiscord | <ElegantBeef> If you can find it sure |
20:37:37 | FromDiscord | <mattrb> Hey beef, any chance you have a magic solution to my question here? π¬ https://discord.com/channels/371759389889003530/371759389889003532/838125046467133460 |
20:37:56 | FromDiscord | <ElegantBeef> You can always use the macrocache if you want to get around cyclical imports |
20:38:01 | FromDiscord | <ElegantBeef> though dont know if it'd work here |
20:39:09 | FromDiscord | <ElegantBeef> It's on github right? I can take a look at it after i take my dogs for a walk in 30-40mins if you're still here π |
20:42:28 | FromDiscord | <mattrb> I don't have the failing code on github, but I can put a branch up! |
20:43:11 | FromDiscord | <mattrb> Here's a reduced set of the file structure, maybe reduced beyond the point of being useful :p I'll send a link to the branch on github in just a sec https://media.discordapp.net/attachments/371759389889003532/838153602408251392/gbaImportError.zip |
20:44:27 | * | d10n-work quit (Ping timeout: 260 seconds) |
20:44:39 | * | Djnwee joined #nim |
20:44:46 | * | npgm quit (Ping timeout: 246 seconds) |
20:45:19 | * | Djnwee quit (Client Quit) |
20:45:44 | * | npgm joined #nim |
20:47:28 | * | d10n-work joined #nim |
20:48:29 | FromDiscord | <mattrb> Here's the branch that I'd _like_ to compile, but seems to be failing due to the cyclic import. Building with `nimble build` yields a different error, but I believe it's tied into the cyclic import error https://github.com/mattrberry/gba/tree/compilation_error_interrupts |
20:48:36 | * | d10n-work quit (Max SendQ exceeded) |
20:48:38 | FromDiscord | <mattrb> Thanks so much for taking a look π |
20:49:33 | FromDiscord | <mattrb> I have to run for a bit but maybe we'll overlap later when you get back π |
20:50:03 | * | kwilczynski quit (Ping timeout: 260 seconds) |
20:50:03 | * | euantorano quit (Ping timeout: 260 seconds) |
20:50:37 | * | d10n-work joined #nim |
20:52:27 | * | kwilczynski joined #nim |
20:52:57 | * | kwilczynski quit (Max SendQ exceeded) |
20:53:29 | * | d10n-work quit (Max SendQ exceeded) |
20:54:09 | * | hoek quit (Ping timeout: 245 seconds) |
20:54:34 | * | omnigoat quit (Ping timeout: 245 seconds) |
20:55:00 | * | raboof quit (Ping timeout: 265 seconds) |
20:55:11 | * | fowl quit (Ping timeout: 260 seconds) |
20:55:17 | * | euantorano joined #nim |
20:55:27 | * | d10n-work joined #nim |
20:55:44 | * | raboof joined #nim |
20:55:45 | * | omnigoat joined #nim |
20:55:50 | * | kwilczynski joined #nim |
20:55:59 | * | hoek joined #nim |
20:56:01 | * | robertmeta quit (Ping timeout: 250 seconds) |
20:56:23 | * | fowl joined #nim |
20:57:25 | * | robertmeta joined #nim |
21:01:02 | FromDiscord | <creonico> How can you set all values of an object to 0 like you can in C `struct some_struct = {0};`? |
21:05:47 | leorize | you don't have to |
21:05:54 | leorize | everything is default 0-initialized |
21:37:09 | * | leorize quit (Ping timeout: 240 seconds) |
21:43:28 | ForumUpdaterBot | New thread by Filcuc: NimQml v0.9.0, see https://forum.nim-lang.org/t/7903 |
21:44:40 | * | leorize joined #nim |
21:45:36 | FromDiscord | <exelotl> @mattrb you can often work around cyclic imports by moving the offending import down to the place where it's first used. |
21:46:09 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3ly4 |
21:46:35 | FromDiscord | <ElegantBeef> Yep that's what i was going to suggest, though you could also use a pointer proc for the CPU's interrupt |
21:48:54 | giaco | is it possible to query the parent type at compile time?' I'm using a type from a lib generated by macro and I'd like to know if it does inherit from a parent |
21:50:05 | FromDiscord | <ElegantBeef> giaco this forum post of mine sorta works for that, can expand it to return a bool instead of the parent https://forum.nim-lang.org/t/7853#49914 |
21:50:53 | giaco | great! thanks as always :) |
21:52:33 | FromDiscord | <ElegantBeef> Saem if you're about i've got a question about the shrinkables, in the case the user passes `(int, (string, int))` that should be two shrinkables right? |
21:53:47 | FromDiscord | <ElegantBeef> Since the first tuple is just our wrapper for allowing multiple types to be passed in with a body |
21:53:50 | giaco | it worked! It says it is not a child object |
21:54:32 | FromDiscord | <ElegantBeef> Do you want it to error on compilation or do you want it to return a bool? |
21:55:15 | FromDiscord | <ElegantBeef> If the latter you can replace that assert line with `newLit(assertCondition)` |
21:55:53 | giaco | neither, I just needed to know if the generated type was child of something else than root, but it is now, so I have a direction now. It was a one time job |
21:56:04 | giaco | *s/now/not |
21:59:05 | * | natrys quit (Quit: natrys) |
22:05:22 | saem | But distracted |
22:05:26 | saem | Fine a bit |
22:09:45 | reversem3 | What does a slot pragma do? |
22:20:09 | saem | Need a bit rather. The shrinkable is context dependent. In the abstract that's one, but the outer one is shrunk by shrinking the two inner ones. Practically speaking, yes you would implement it as two. |
22:31:04 | * | tane quit (Quit: Leaving) |
23:14:59 | FromDiscord | <ElegantBeef> reversem3 i've never seen slot, where did you see it? |
23:26:43 | saem | back |
23:29:37 | FromDiscord | <ElegantBeef> So i'm closer to reasoning around that flaw of my previous pass, but seems rather difficult to solve properly π goes from the passed in tuple to an arbitrary that has a generator that calls it's children but doesnt work properly still π |
23:29:45 | FromDiscord | <ElegantBeef> Damn i need to stop using emojis |
23:30:07 | FromDiscord | <ElegantBeef> Too bad i was corrupted by poe's law existing |
23:30:25 | FromDiscord | <mattrb> In reply to @exelotl "<@!221832495367323648> you can often": Iβll be home in about 30 mins to take a look and Iβll let you know! Thank you! |
23:31:38 | FromDiscord | <exelotl> In reply to @ElegantBeef "Damn i need to": gotta use more emojis π |
23:32:21 | * | Vladar quit (Remote host closed the connection) |
23:36:07 | saem | I think a template that generated a generic `assertProperty` of some airty and does the tuple unpacking for you so you can write a matching airty predicate function would be pretty close to ideal. |
23:37:30 | FromDiscord | <mattrb> In reply to @ElegantBeef "Damn i need to": Yeah youβre one to talk about cutting off my thumbs |
23:37:59 | FromDiscord | <ElegantBeef> Hey i've only adapted since i'm rather insincere but it's the interenet |
23:38:02 | FromDiscord | <ElegantBeef> (edit) "interenet" => "internet" |
23:45:44 | ForumUpdaterBot | New thread by Masiarek2: Learn Nim regular expressions - regex, re , NRE , see https://forum.nim-lang.org/t/7904 |