00:18:38 | FromDiscord | <ynfle> @ckennedy I have a macro solution to your problem |
00:19:16 | FromDiscord | <ckennedy> In reply to @ynfle "<@!296348328122384386> I have a": Oh yeah? |
00:20:21 | FromDiscord | <ynfle> https://media.discordapp.net/attachments/371759389889003532/939676856473505902/types.nim https://media.discordapp.net/attachments/371759389889003532/939676856687423538/main.nim |
00:20:48 | FromDiscord | <ynfle> In reply to @ckennedy "Oh yeah?": โ๏ธ |
00:28:14 | FromDiscord | <ckennedy> Whoa, nice work! So it loops over the fields and generates the `fieldName` and `setName` for each one? |
00:32:29 | FromDiscord | <ynfle> In reply to @ckennedy "Whoa, nice work! So": Ya |
00:32:29 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3OLV |
00:35:09 | FromDiscord | <ckennedy> sent a code paste, see https://play.nim-lang.org/#ix=3OLW |
00:36:27 | FromDiscord | <ynfle> In reply to @ckennedy "Got it. Great starting": ๐ |
00:46:07 | FromDiscord | <noow> templates and inlined procs should have roughly the same overhead (= close to none), right? |
00:47:00 | FromDiscord | <noow> is there a flag which makes all procs that can be inlined inlined? |
00:48:43 | FromDiscord | <Elegantbeef> The C compiler already will when doing `release`/`danger` |
00:48:44 | FromDiscord | <Elegantbeef> Inline procedures may not be inlined though, whereas templates always will be |
00:57:39 | FromDiscord | <noow> In reply to @Elegantbeef "The C compiler already": ah makes sense |
01:30:36 | FromDiscord | <auxym> templates are inlined by nim, inline procs are inlined by gcc (at its discretion) |
02:16:25 | FromDiscord | <gibson> Karax question: How is it direct dom alterations like HTMX or AlpineJS do not confuse Karax's virtual dom functionality? |
02:35:49 | * | krux02 quit (Remote host closed the connection) |
03:08:00 | * | jsef5 quit (Quit: CoreIRC for Android - www.coreirc.com) |
03:20:41 | * | Gustavo6046 joined #nim |
03:24:35 | FromDiscord | <Sabena Sema> The main reason you use templates instead of a normal proc (that gets inlined, you can use pragmas to add an attribute that will _force_ it to always be inlined, unless you use msvc) is that they don't open new scopes |
03:25:49 | FromDiscord | <Sabena Sema> so like an "assert" procedure that takes a bool can't print the expression that failed, as it's evaluated before the procedure is called and is not longer accessible, and assert macro can access it |
03:43:21 | * | arkurious quit (Quit: Leaving) |
03:59:08 | FromDiscord | <Evrensel Kiลilik> sooooooooooooooooooooooo |
03:59:12 | FromDiscord | <Evrensel Kiลilik> i wrote this |
03:59:14 | FromDiscord | <Evrensel Kiลilik> https://rohanrhu.github.io/gdb-frontend/tutorials/makefile-integration/ |
04:05:08 | FromDiscord | <noow> is there a way to tell nim that function calls are illegal within a certain region of code |
04:05:40 | FromDiscord | <noow> (if i want to force myself to rewrite everything in terms of templates) |
04:05:42 | FromDiscord | <Elegantbeef> What do you mean? |
04:06:08 | FromDiscord | <Sabena Sema> yes, but it's not a good idea |
04:06:21 | FromDiscord | <noow> isn't inlining always faster? |
04:06:24 | FromDiscord | <Sabena Sema> no |
04:06:58 | FromDiscord | <noow> oh god |
04:07:24 | FromDiscord | <Sabena Sema> it makes the generated code larger |
04:07:48 | FromDiscord | <Sabena Sema> like if you have a huge function and call it twice it's faster to not inline it |
04:08:13 | FromDiscord | <Sabena Sema> because if you don't inline then the second call executes code that's probably already in the instruction cache |
04:08:17 | FromDiscord | <Sabena Sema> if you inline then it doesn't |
04:08:26 | FromDiscord | <noow> ah thanks |
04:08:27 | FromDiscord | <Sabena Sema> there are other reasons it can be slower too |
04:08:33 | FromDiscord | <noow> that's reasonable |
04:09:02 | FromDiscord | <Sabena Sema> in fact, one of the biggest reason you inline in the first place is that it helps _other_ optimizations down the line |
04:09:23 | FromDiscord | <noow> i thought it was to avoid the overhead of a function clal |
04:09:27 | FromDiscord | <noow> (edit) "clal" => "call" |
04:09:30 | * | vicecea quit (Remote host closed the connection) |
04:09:50 | FromDiscord | <Sabena Sema> the compiler has to generate the non-inlined code to be suitable for any situation, but after in-lining it can optimize for the specific callsite |
04:09:53 | FromDiscord | <Sabena Sema> that's part of it |
04:10:01 | * | vicecea joined #nim |
04:10:24 | FromDiscord | <Elegantbeef> c compilers generally do inline intelligently |
04:10:24 | FromDiscord | <Sabena Sema> but for smaller functions with few parameters modern calling conventions don't have much more overhead than any other indirect jump |
04:10:30 | FromDiscord | <Sabena Sema> yeah |
04:10:38 | FromDiscord | <Sabena Sema> if you just care about performance it's best to leave it to the compiler |
04:11:14 | FromDiscord | <Sabena Sema> though, sometimes, it can be worth forcing inlining for some functions, especially if you care about debug-mode performance |
04:11:38 | FromDiscord | <Sabena Sema> stuff like c++ style metaprogramming that generates deep callchains of small functions |
04:13:28 | FromDiscord | <noow> thanks for the knowledge |
04:13:35 | FromDiscord | <noow> i shall try to use it the best i can |
04:13:52 | FromDiscord | <Elegantbeef> I tend to think "performance is only an issue when it's an issue" |
04:14:13 | FromDiscord | <Elegantbeef> Write code that works then make it fast |
04:14:36 | FromDiscord | <noow> of course correctness is where most of my time goes |
04:14:45 | FromDiscord | <noow> i just want to learn to profile and optimize |
04:15:04 | FromDiscord | <Sabena Sema> I'm a very "I want the code the look just so" kinda person, but inlining is definitely something where you should let the optimizer do it's thing |
04:15:14 | FromDiscord | <Elegantbeef> Well then get a profiler and profile |
04:15:15 | FromDiscord | <Elegantbeef> Dont just inline cause "I think it's faster" |
04:15:23 | FromDiscord | <Sabena Sema> yeah |
04:15:54 | FromDiscord | <noow> the overhead of calling functions is not something that shows up with valgrind, or? |
04:16:03 | FromDiscord | <Sabena Sema> I mean stuff like C style resizeable arrays having insertion functions that don't double copy the tail and stuff |
04:16:18 | FromDiscord | <Sabena Sema> I think valgrind is an instramentation based profiler (not sure) |
04:16:36 | FromDiscord | <Sabena Sema> if so, it's not great at identifying ... well most perf problems |
04:16:41 | FromDiscord | <Sabena Sema> you want a sampling profiler |
04:16:59 | FromDiscord | <Sabena Sema> you use instrumentation when you really need exact execution traces and callcounts |
04:17:23 | FromDiscord | <noow> ah okay |
04:17:35 | FromDiscord | <Sabena Sema> the usual linux solution is "perf" |
04:17:38 | FromDiscord | <Elegantbeef> If calling functions is what needs optimized you're in a good state |
04:17:42 | FromDiscord | <Sabena Sema> the gold standard imo is intel V-Tune |
04:17:46 | FromDiscord | <Sabena Sema> but it only really works on intel CPUs |
04:17:58 | FromDiscord | <noow> but a sampling profiler would still only tell me which lines are being spent on the most |
04:18:02 | FromDiscord | <noow> right? |
04:18:20 | FromDiscord | <noow> yeah i'm on intel, thanks for the tip for "perf" |
04:18:28 | FromDiscord | <Sabena Sema> In reply to @Elegantbeef "If calling functions is": yeah, but if you use an instrumentation based is can appear you're spending all your time calling functions when you actually are not |
04:18:41 | FromDiscord | <Sabena Sema> perf works on all (almost all) chips |
04:18:45 | FromDiscord | <Sabena Sema> perf is also just cool |
04:18:47 | FromDiscord | <noow> (edit) "intel," => "intel/linux," |
04:19:06 | FromDiscord | <Sabena Sema> you can install debug symbols and run "perf top" and just see like globally where _everything_ on your system is spending time |
04:19:20 | FromDiscord | <noow> lol |
04:19:39 | FromDiscord | <noow> In reply to @Sabena Sema "you can install debug": probably needs root permissions then though |
04:20:03 | FromDiscord | <Rika> In reply to @Sabena Sema "the gold standard imo": AMD UProf |
04:20:14 | FromDiscord | <Sabena Sema> imo v-tune is mcuh, much better than uprof |
04:20:26 | FromDiscord | <Rika> Itโs same same to me |
04:20:36 | FromDiscord | <Rika> If I canโt use it itโs basically worse to me xd |
04:20:48 | FromDiscord | <Sabena Sema> yeah ๐ |
04:20:59 | FromDiscord | <noow> https://media.discordapp.net/attachments/371759389889003532/939737408390451240/scrn-2022-02-06-05-20-42.png |
04:21:00 | FromDiscord | <noow> lol |
04:21:07 | FromDiscord | <Sabena Sema> that's fine |
04:21:15 | FromDiscord | <Sabena Sema> it can sample from the wrapper |
04:21:27 | FromDiscord | <Rika> Performance tools usually need root for the really good kinda sampling lol |
04:21:28 | FromDiscord | <Sabena Sema> it just won't tell you where in the kernel you're spending time after making a syscall |
04:21:50 | FromDiscord | <Sabena Sema> yeah, you can get basic sampling with just like, the ability to ptrace your own processes |
04:22:10 | FromDiscord | <Sabena Sema> for the like, full uarch overview stuff yeah |
04:22:39 | FromDiscord | <Sabena Sema> (good profilers can sample not just time spent, but also the status of various CPU bits) |
04:34:28 | FromDiscord | <noow> i think perf does not like linux-hardened |
04:37:24 | FromDiscord | <noow> but i finally got a sample |
04:37:38 | FromDiscord | <Rika> oh it wont like hardened kernels |
04:39:05 | FromDiscord | <noow> what would eqcopy stand for |
04:39:31 | FromDiscord | <noow> (edit) "eqcopy" => "eqcopysystem" |
04:44:28 | FromDiscord | <Rika> `=copy` in system.nim |
04:46:27 | * | fowl quit (Quit: cya pals) |
04:57:02 | * | fowl joined #nim |
05:12:41 | * | fowl quit (Quit: cya pals) |
05:18:02 | * | fowl joined #nim |
05:28:32 | * | fowl quit (Quit: cya pals) |
05:29:13 | * | fowl joined #nim |
05:54:49 | FromDiscord | <Hamid_Bluri> hey, why do i get `invalid pragma: dynlib: "..."` ? |
05:55:40 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3OMT |
05:55:58 | FromDiscord | <Elegantbeef> Showing code is wonderful |
05:56:32 | FromDiscord | <Elegantbeef> types arent stored in dynamic libs afaik |
05:56:36 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3OMU |
05:56:40 | FromDiscord | <Elegantbeef> So using `dynlib` for a type makes 0 sense |
05:57:01 | FromDiscord | <Hamid_Bluri> Oh, thanks |
05:57:13 | FromDiscord | <Sabena Sema> yeah types are a convention, they are not stored in object code at all |
05:57:17 | FromDiscord | <Sabena Sema> (rtti excluded) |
05:57:23 | FromDiscord | <slackaduts> Can someone explain to me the difference between a sequence and an array (coming from python, VERY much a novice in Nim) |
05:57:34 | FromDiscord | <Elegantbeef> arrays are static sized |
05:57:57 | FromDiscord | <slackaduts> Oh. I'm assuming sequences can be iterated through as arrays can, correct? |
05:57:57 | FromDiscord | <Elegantbeef> sequences are not |
05:57:57 | FromDiscord | <Elegantbeef> That's all you really need to know |
05:58:03 | FromDiscord | <Elegantbeef> There are more differences but not that should bother you really |
05:58:05 | FromDiscord | <Elegantbeef> Yes |
05:58:11 | FromDiscord | <Elegantbeef> Arrays are compile time fixed collections of T |
05:58:12 | FromDiscord | <slackaduts> cool ty |
05:58:17 | FromDiscord | <Elegantbeef> Sequences are dynamically sized collections of T |
05:58:34 | FromDiscord | <Elegantbeef> Arrays can also be indexed by any ordinal |
05:58:51 | FromDiscord | <Elegantbeef> So you can make `array[bool, int]` for instance |
05:59:05 | FromDiscord | <slackaduts> ah, cool |
05:59:12 | FromDiscord | <Hamid_Bluri> i didn't know bool is ordinal |
05:59:23 | FromDiscord | <Elegantbeef> It's an enum |
05:59:30 | FromDiscord | <Elegantbeef> !eval echo bool is enum |
05:59:32 | NimBot | false |
05:59:43 | FromDiscord | <Elegantbeef> Hey fuck you nimbot |
05:59:47 | FromDiscord | <Hamid_Bluri> lol |
06:00:03 | FromDiscord | <slackaduts> In reply to @Elegantbeef "Hey fuck you nimbot": Matrix 4: Resurrections |
06:00:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/P4N |
06:00:44 | FromDiscord | <Elegantbeef> Bool being magic means it doesnt abide to `enum` typeclass |
06:00:53 | FromDiscord | <Elegantbeef> Ponders if that's a bug |
06:02:17 | FromDiscord | <slackaduts> sent a code paste, see https://paste.rs/7mZ |
06:02:29 | FromDiscord | <Elegantbeef> Yea |
06:02:45 | FromDiscord | <Elegantbeef> `ClientHandler` is a type |
06:02:45 | FromDiscord | <Elegantbeef> Oh nevermind i see the error ๐ |
06:02:57 | FromDiscord | <Elegantbeef> My reading skills are second to all |
06:03:34 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3ON1 |
06:03:46 | FromDiscord | <Elegantbeef> What's `ClientHandler`'s type definition |
06:03:53 | FromDiscord | <Elegantbeef> Did you forget to do `clients: seq[Client]`? |
06:04:10 | FromDiscord | <Hamid_Bluri> export postfix `` |
06:04:20 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3ON2 |
06:04:24 | FromDiscord | <Elegantbeef> Despite outward appearances Nim is not Python, it actually has module export levels |
06:04:36 | FromDiscord | <slackaduts> I do not know what that means |
06:04:38 | FromDiscord | <slackaduts> anyway |
06:04:47 | FromDiscord | <Elegantbeef> `clients: seq[Client]` is how you make a field accessible from another module |
06:04:52 | FromDiscord | <slackaduts> oh |
06:05:03 | FromDiscord | <Elegantbeef> It's the opposite of the `_thing` in python, but enforced |
06:05:24 | FromDiscord | <Elegantbeef> all top level symbols in Nim are by default private and need `` to export |
06:05:35 | FromDiscord | <Rika> i mean technically its "enforced" in python but here there is no workaround other than exporting |
06:05:50 | FromDiscord | <Elegantbeef> It's not enforced it's a programmer contract the last i checked |
06:06:01 | FromDiscord | <Elegantbeef> The runtime doesnt say "No stop it get some help" |
06:06:09 | FromDiscord | <Rika> not really, you have to do some fuckery to get there |
06:06:23 | FromDiscord | <Elegantbeef> I thought it was just doing `myObject._myField` |
06:07:47 | FromDiscord | <Rika> no |
06:07:52 | FromDiscord | <Rika> it does some mangling too afaik |
06:07:57 | FromDiscord | <Rika> or was that double underscore? |
06:08:03 | FromDiscord | <Rika> one or the other is doing mangling |
06:08:24 | FromDiscord | <Elegantbeef> two underscores mangles |
06:08:31 | FromDiscord | <Elegantbeef> and the mangle is `classNamefieldName` |
06:08:58 | FromDiscord | <Elegantbeef> Actually seems either |
06:09:05 | FromDiscord | <Elegantbeef> > Any identifier of the form \_\_geek (at least two leading underscores or at most one trailing underscore) is replaced with \_classname\_\_geek |
06:09:45 | FromDiscord | <Elegantbeef> So i guess it's safe to say "it's the opposite of Python's `_Field` |
06:10:13 | FromDiscord | <Elegantbeef> Cause you can also technically get the other fields if you really wanted to outside of the base module |
06:11:09 | FromDiscord | <Elegantbeef> As usual i'm still rambling and the person asking for help is in another universe |
06:11:44 | * | fowl quit (Quit: cya pals) |
06:11:53 | FromDiscord | <slackaduts> In reply to @Elegantbeef "As usual i'm still": sorry |
06:12:07 | FromDiscord | <Elegantbeef> Why are you apologizing i'm the one rambling |
06:12:21 | FromDiscord | <slackaduts> oh, nvm then |
06:12:26 | FromDiscord | <Rika> xd |
06:12:30 | FromDiscord | <slackaduts> "fuck you, I'm not sorry" xd |
06:12:36 | FromDiscord | <Elegantbeef> There we go |
06:12:37 | FromDiscord | <Rika> thats the spirit |
06:12:42 | FromDiscord | <Elegantbeef> You'll fit right in if you keep that behaviour |
06:13:08 | FromDiscord | <Elegantbeef> Atleast that's pretty much how the few active people act ๐ |
06:14:03 | FromDiscord | <Elegantbeef> cept evo, he's too positive |
06:14:11 | FromDiscord | <Elegantbeef> Always thanking me for helping, fucking weirdo |
06:14:37 | FromDiscord | <slackaduts> always say crew off to someone who helps you |
06:14:40 | FromDiscord | <slackaduts> :gigachad: |
06:14:49 | FromDiscord | <slackaduts> (edit) "crew" => "screw" |
06:14:50 | FromDiscord | <Elegantbeef> There you go |
06:14:55 | FromDiscord | <Elegantbeef> Make them stay humble |
06:15:46 | FromDiscord | <slackaduts> also holy shit Nim's docs are awfulโตโตlike I have nothing against the person/people who wrong them but damn |
06:15:57 | FromDiscord | <slackaduts> (edit) "wrong" => "wrote" |
06:16:05 | FromDiscord | <Elegantbeef> "PRs welcome" ๐ |
06:16:18 | FromDiscord | <Elegantbeef> Which docs btw? |
06:16:57 | FromDiscord | <slackaduts> I'm looking at nim for python programmers |
06:17:07 | FromDiscord | <slackaduts> it's been genuinely wrong about some things |
06:17:11 | FromDiscord | <Elegantbeef> Ah the wiki github |
06:17:33 | FromDiscord | <Elegantbeef> Feel free to modify it ๐ |
06:18:13 | FromDiscord | <slackaduts> sent a code paste, see https://paste.rs/tk8 |
06:18:17 | FromDiscord | <Elegantbeef> I dont know python much so cant say much about it ๐ |
06:18:25 | FromDiscord | <Elegantbeef> seems like you did `for Client in clients` |
06:18:44 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix= |
06:18:51 | FromDiscord | <Elegantbeef> Hard to say the issure without the code with an error |
06:18:54 | FromDiscord | <slackaduts> (edit) |
06:19:15 | FromDiscord | <Elegantbeef> Well what's the line it's erroring on |
06:19:15 | FromDiscord | <Elegantbeef> It's clearly not that one |
06:19:41 | FromDiscord | <slackaduts> oh, it's not even erroring in my project |
06:19:50 | FromDiscord | <slackaduts> this is so strange |
06:20:06 | FromDiscord | <Elegantbeef> What's the entire error and what's the code? |
06:20:13 | * | fowl joined #nim |
06:20:32 | FromDiscord | <slackaduts> getting it, will take a sec |
06:20:42 | FromDiscord | <Rika> whats wrong with the wiki? ill look at it |
06:21:07 | FromDiscord | <Rika> also full error is always appreciated, most lines are pretty useful |
06:21:08 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3ON5 |
06:21:11 | FromDiscord | <Rika> ok |
06:21:15 | FromDiscord | <slackaduts> lemme get code now |
06:21:39 | FromDiscord | <Elegantbeef> Issue is you dont have hashes imported |
06:21:43 | FromDiscord | <Rika> you're doing something with `[]` that you put a client instead of a string or w/e |
06:22:19 | FromDiscord | <Elegantbeef> They're using a `Table[Client, T]` and did not export `hashes` so cannot do `a[client]` i assume |
06:22:29 | FromDiscord | <Rika> or dont have a hash for client |
06:22:33 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3ON6 |
06:22:41 | FromDiscord | <Rika> is client your own type |
06:22:46 | FromDiscord | <Elegantbeef> I think 1.6.0 made it so hash works on refs by default |
06:22:47 | FromDiscord | <Rika> you have to implement a hash function for it |
06:23:00 | FromDiscord | <slackaduts> it's not my type it's from a library |
06:23:02 | FromDiscord | <slackaduts> but yes |
06:23:14 | FromDiscord | <slackaduts> (edit) "it's not my type it's from a ... library" added "yet to be finished" |
06:23:48 | FromDiscord | <Elegantbeef> Is the library public? |
06:23:49 | FromDiscord | <Elegantbeef> Wait nevermind |
06:24:04 | FromDiscord | <Elegantbeef> `import std/[tables, hashes]` |
06:24:04 | FromDiscord | <Elegantbeef> That should resolve the issue |
06:24:55 | FromDiscord | <slackaduts> In reply to @Elegantbeef "`import std/[tables, hashes]`": same error |
06:25:10 | FromDiscord | <Elegantbeef> then implement a hash procedure for `Client` |
06:25:11 | FromDiscord | <slackaduts> In reply to @Rika "you have to implement": that sounds very complex |
06:25:21 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/hashes.html |
06:25:24 | FromDiscord | <Elegantbeef> Explains how |
06:25:31 | FromDiscord | <Elegantbeef> Uses obscure operators cause fuck you i guess |
06:26:45 | FromDiscord | <slackaduts> gotta love how a simple thing like an iterator is massively overcomplicated for no real reason |
06:26:53 | FromDiscord | <Elegantbeef> It's not the iterator |
06:27:02 | FromDiscord | <slackaduts> client is the iterator here |
06:27:17 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix= |
06:27:43 | FromDiscord | <Elegantbeef> That's not causing this |
06:27:53 | FromDiscord | <Rika> thats not the issue |
06:28:04 | FromDiscord | <Rika> `var client_speeds {.global.} = initTable[Client, int]()` this is technically your issue |
06:28:07 | FromDiscord | <Elegantbeef> the issue is that there isnt a `hash` procedure declared for your `Client` |
06:28:08 | FromDiscord | <Elegantbeef> `nim -v`? |
06:28:26 | FromDiscord | <slackaduts> In reply to @Rika "`var client_speeds {.global.} =": I just looked up how to create an empty table here |
06:28:42 | FromDiscord | <Rika> tables need hashes |
06:29:00 | FromDiscord | <Rika> client doesnt have a hash function |
06:29:08 | FromDiscord | <Rika> therefore you cant use it as a key in a table |
06:29:10 | FromDiscord | <slackaduts> how does one make a hash function |
06:29:17 | FromDiscord | <Rika> In reply to @Elegantbeef "https://nim-lang.org/docs/hashes.html": elaborated here |
06:30:12 | FromDiscord | <Elegantbeef> You can do `-d:nimPreviewHashRef` as a compiler flag |
06:31:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/Ymn |
06:31:18 | FromDiscord | <Elegantbeef> Though i dont recall if it hashes the pointer or the fields |
06:31:32 | FromDiscord | <Elegantbeef> It hashes the pointer |
06:31:43 | FromDiscord | <slackaduts> this language sure is great at giving you the illusion of simplicity |
06:32:13 | FromDiscord | <Rika> In reply to @Elegantbeef "It hashes the pointer": of course it does, two same objects but different refs musnt be == |
06:32:21 | FromDiscord | <Elegantbeef> It's a systems programming language afterall ๐ |
06:32:23 | FromDiscord | <Rika> In reply to @slackaduts "this language sure is": so does python, so does js, so does ... |
06:32:39 | FromDiscord | <Elegantbeef> And to be fair making your own hash isnt the most complex thing |
06:32:49 | FromDiscord | <slackaduts> In reply to @Elegantbeef "And to be fair": sure is seeming like it lmao |
06:33:19 | FromDiscord | <Rika> did you at least read the documentation |
06:33:28 | FromDiscord | <slackaduts> what documentation, it's very scattered |
06:33:36 | FromDiscord | <slackaduts> I've been looking up shit as I can |
06:33:42 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/hashes.html |
06:33:42 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/hashes.html |
06:33:43 | FromDiscord | <Rika> we sent you a link |
06:33:45 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/hashes.html |
06:33:47 | FromDiscord | <slackaduts> yes |
06:33:51 | FromDiscord | <Rika> did you open it |
06:33:52 | FromDiscord | <slackaduts> I've been reading that |
06:33:56 | FromDiscord | <Rika> did you read it wholly |
06:33:59 | FromDiscord | <Rika> not skim |
06:34:00 | FromDiscord | <Elegantbeef> It explains in there how to hash it |
06:34:00 | FromDiscord | <Elegantbeef> The first example |
06:34:01 | FromDiscord | <Rika> not skip |
06:34:01 | FromDiscord | <slackaduts> I thought you meant docs in general, you never specified |
06:34:10 | FromDiscord | <slackaduts> im fucking reading it |
06:34:15 | FromDiscord | <Elegantbeef> We referenced the hash docs 3 times ๐ |
06:34:45 | FromDiscord | <Rika> then ask instead of complain, what dont you understand from it |
06:35:00 | FromDiscord | <Rika> so at least we can get somewhere instead of argue |
06:35:16 | FromDiscord | <Elegantbeef> Arguing is fun! |
06:35:19 | FromDiscord | <Rika> its a waste of your time to argue, you'd really prefer to get on with it right? so let us help you |
06:36:25 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/tables.html#basic-usage-hashing also explains the issue |
06:43:30 | FromDiscord | <slackaduts> In reply to @Elegantbeef "https://nim-lang.org/docs/tables.html#basic-usage-h": so what isf there's fields within the Client type that also don't have a hashing function |
06:43:35 | FromDiscord | <slackaduts> (edit) "isf" => "if" |
06:44:04 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3ONa |
06:44:57 | FromDiscord | <Elegantbeef> the procedure needs to be named `hash` btw |
06:45:34 | FromDiscord | <Elegantbeef> Depending on the behaviour you want is what you need to hash |
06:45:36 | FromDiscord | <slackaduts> In reply to @Elegantbeef "the procedure needs to": oh. |
06:45:55 | FromDiscord | <Elegantbeef> If you want an object with the same value fields to match you only need to hash the value fields |
06:46:19 | FromDiscord | <Elegantbeef> If you just want a pointer to match you can use the `-d:nimPreviewHashRef` |
06:46:56 | FromDiscord | <Rika> In reply to @slackaduts "so what if there's": then they also need a hash function |
06:47:10 | FromDiscord | <slackaduts> oh boy. |
06:47:11 | FromDiscord | <Rika> beef whip the hash generating macro smh |
06:47:16 | FromDiscord | <Rika> (edit) "beef whip ... the" added "out" |
06:47:21 | FromDiscord | <Rika> you better have on |
06:47:22 | FromDiscord | <Rika> (edit) "on" => "one" |
06:47:31 | FromDiscord | <Elegantbeef> I dont cause i dont use reference objects much ๐ |
06:47:41 | FromDiscord | <slackaduts> I heard macro's have the potential to break stuff a ton so I haven't looked into them |
06:47:45 | FromDiscord | <slackaduts> (edit) "macro's" => "macros" |
06:48:03 | FromDiscord | <Rika> hammers have the potential to break stuff a ton |
06:48:06 | FromDiscord | <Rika> people still use them |
06:48:08 | FromDiscord | <Elegantbeef> They dont "break stuff a ton" |
06:48:19 | FromDiscord | <Elegantbeef> Anyway the solution could just be that CLI flag |
06:48:24 | FromDiscord | <Elegantbeef> depends on the behaviour you want |
06:48:36 | FromDiscord | <slackaduts> In reply to @Elegantbeef "depends on the behaviour": I don't know enough to answer this |
06:49:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ONb |
06:49:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ONc |
06:50:25 | FromDiscord | <slackaduts> I just want a client to correspond to an integer in a table |
06:50:34 | FromDiscord | <slackaduts> I don't know what either of those even do |
06:50:47 | FromDiscord | <slackaduts> (edit) removed "even" |
06:51:32 | FromDiscord | <Elegantbeef> Then try the compiler flag and if that doesnt work for you implement your own hash for the `Client` |
06:51:47 | FromDiscord | <Elegantbeef> The diference is that any instantiation of your object with the same fields gets the same entry in the table, versus each unique instance of client gets it's own entry |
06:52:10 | FromDiscord | <Elegantbeef> Are fields the important delimiter or are instances is the basic question |
06:52:24 | FromDiscord | <slackaduts> In reply to @Elegantbeef "The diference is that": the latter is what I want |
06:53:16 | FromDiscord | <Elegantbeef> Then there you go the compiler flag will work |
06:53:27 | FromDiscord | <slackaduts> ok thanks |
06:54:45 | FromDiscord | <Elegantbeef> Table relations can be complicated depending on what you're after ๐ |
06:54:46 | FromDiscord | <Elegantbeef> You can have it behave like a value object or like an integer |
06:54:52 | FromDiscord | <Elegantbeef> By like an integer i mean the pointer is hashed and used |
06:55:23 | FromDiscord | <Elegantbeef> inane ramblings again |
06:55:29 | FromDiscord | <slackaduts> I'm listening |
06:57:01 | FromDiscord | <Rika> beef i dont think what you said is clear |
06:57:16 | FromDiscord | <Elegantbeef> Have i ever been? |
06:57:22 | FromDiscord | <Rika> basically what he means is when it comes to hashing ref objects, you can either hash the inner regular object or the pointer value |
06:57:41 | FromDiscord | <slackaduts> ah |
06:58:20 | FromDiscord | <Rika> the former means that any object (as long as the data is the same) would have the same hashโตthe latter means that if the pointers are the same, the hashes are the same, regardless of data (or you can also incorporate the data if wanted, theres a lot of options) |
06:58:49 | FromDiscord | <slackaduts> yeah |
06:59:20 | FromDiscord | <Elegantbeef> There's a reason that by default refs werent automatically done ๐ |
07:00:26 | FromDiscord | <Elegantbeef> But now we have a flag that allows us to easily do it and overload if we need to |
07:01:17 | FromDiscord | <Elegantbeef> The flag wont be needed for the next minor nim version iirc, just here for migration |
07:04:49 | FromDiscord | <slackaduts> welp I'm going to bed, my mind and patience are fading fast and I have shit to do tomorrowโตthanks for the help |
07:29:55 | * | [R] quit (Ping timeout: 256 seconds) |
07:30:16 | * | [R] joined #nim |
07:55:13 | * | pro joined #nim |
08:04:23 | FromDiscord | <Zajt> In reply to @enthus1ast "maybe also add --gc\:arc": Added those two but doesn't work when I add them. What do you mean with host application? |
08:05:51 | NimEventer | New post on r/nim by timrichardson: Debugging, see https://reddit.com/r/nim/comments/slrk7w/debugging/ |
08:07:27 | FromDiscord | <xx_ns> In reply to @Zajt "Added those two but": think he meant to ask whether the application that loads the 64-bit dll is also by itself 64-bit |
08:08:22 | FromDiscord | <Zajt> yeah it is |
08:23:01 | FromDiscord | <0000> i have aids |
08:35:48 | * | jjido joined #nim |
08:55:29 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzโฆ) |
08:56:36 | * | Kitsune_ joined #nim |
08:57:27 | * | Kitsune_ quit (Client Quit) |
09:38:12 | * | xaltsc quit (Remote host closed the connection) |
09:49:13 | FromDiscord | <Phil> Hmm my google-fu is disappointing me once again |
09:49:28 | FromDiscord | <Phil> Do we have a library for converting a jpeg/png or whatever to webp? |
09:49:50 | FromDiscord | <Phil> I've found pixie so far but I don't think that's what I'm looking for. I just need conversion not image creation |
09:50:57 | FromDiscord | <Elegantbeef> Well pixie can handle conversion but webp isnt supported by it |
09:51:41 | FromDiscord | <Phil> Hmmmmmmmmmmmโตhmmmmmmmmmmm |
09:52:08 | FromDiscord | <Elegantbeef> `libwebp` exists |
09:52:11 | FromDiscord | <Phil> I've never looked into it but am contemplating whether I should just write a python script |
09:52:15 | FromDiscord | <Elegantbeef> But you'd need to wrap it |
09:52:16 | FromDiscord | <Phil> And call that |
09:52:36 | FromDiscord | <Elegantbeef> What kinda bumfuckery are you doing |
09:52:46 | FromDiscord | <Elegantbeef> https://developers.google.com/speed/webp/docs/api |
09:52:59 | FromDiscord | <Elegantbeef> It's like 2 functions |
09:53:02 | FromDiscord | <Phil> I think asking which bumfuckery I'm not doing is a question with an easier answer |
09:53:18 | FromDiscord | <Phil> Mostly I just want, if users upload images to my webserver, for them to be webp |
09:53:49 | FromDiscord | <Phil> I allow myself to be tyrannical enough that I force webp upon them if they don't.โตMostly because I've got some overview pages where I display a decent amount of images and I want them to be loading decently fast. |
09:54:11 | * | PMunch joined #nim |
09:54:43 | FromDiscord | <Phil> UI like this https://media.discordapp.net/attachments/371759389889003532/939821399340625940/Screenshot_from_2022-02-06_10-54-23.png |
09:54:47 | FromDiscord | <Elegantbeef> Well you can use cwebp if you're lazy |
09:54:47 | FromDiscord | <Elegantbeef> But the proper thing would be to wrap libwebp |
09:55:10 | FromDiscord | <Phil> ... I guess it would teach me how to wrap libraries |
09:55:22 | FromDiscord | <Phil> Which is a skillset I don't have in nim and is likely to come in handy |
09:55:38 | * | krux02 joined #nim |
09:56:02 | FromDiscord | <Elegantbeef> Well it's a simple API so have at -er |
09:56:13 | FromDiscord | <Phil> Given that I haven't wrapped anything ever |
09:56:22 | FromDiscord | <Phil> Is there any sort of stuff I can read into to get an introduction? |
09:56:28 | FromDiscord | <Elegantbeef> Thought it's a windows library so it's a fucking pain to get the library |
09:56:29 | FromDiscord | <Elegantbeef> I mean a google library ๐ |
09:56:53 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#foreign-function-interface-importc-pragma there isnt much to it really |
09:57:35 | FromDiscord | <Elegantbeef> Oh nice they have easily downloaded libraries |
09:58:02 | FromDiscord | <Elegantbeef> The encode file is 500 loc and heavily commented |
09:59:52 | FromDiscord | <Phil> So there I was |
09:59:54 | FromDiscord | <Elegantbeef> Oh they ship the static libraries |
09:59:58 | FromDiscord | <Phil> Googling if somebody already did the work for me |
10:00:03 | FromDiscord | <Phil> I found juancarlospaco |
10:00:17 | FromDiscord | <Phil> and he apparently only wraps the CLI stuff |
10:00:24 | FromDiscord | <Phil> Dangit! |
10:00:36 | FromDiscord | <Elegantbeef> Let's see if c2nim works with it |
10:00:42 | FromDiscord | <Elegantbeef> It's simple so i assume so |
10:04:17 | FromDiscord | <Phil> I just downloaded the source code tar |
10:04:35 | FromDiscord | <Elegantbeef> You dont need the sourcee code |
10:04:35 | FromDiscord | <Elegantbeef> https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html |
10:04:36 | FromDiscord | <Phil> I'm really noticing my lack of experience in C because I'm immediately getting overwhelmed by the fucktons of files in there |
10:04:44 | FromDiscord | <Elegantbeef> You can download the library here |
10:04:53 | FromDiscord | <Elegantbeef> You want the library not the source |
10:04:59 | FromDiscord | <Elegantbeef> There are like 6 C files for the library |
10:05:08 | FromDiscord | <Elegantbeef> You only need to wrap `types.h` `encode.h` and `decode.h` |
10:08:48 | FromDiscord | <Elegantbeef> Let's see if i can get c2nim to work on it and explain how before i sleep |
10:10:24 | FromDiscord | <Phil> So include/webp and...err |
10:10:29 | FromDiscord | <Phil> Well I got the files, I'm seeing the manual |
10:10:33 | FromDiscord | <Phil> I'm not seeing which command to execute |
10:10:49 | FromDiscord | <Elegantbeef> Yea that's it |
10:10:49 | FromDiscord | <Elegantbeef> `c2nim file.h` will convert it |
10:10:56 | FromDiscord | <Elegantbeef> Looking at it further `types` is pretty much useless in Nim |
10:12:21 | FromDiscord | <Phil> It is certainly keeping one of my CPU cores occupied |
10:12:38 | FromDiscord | <Elegantbeef> It took my cpu like 1ms |
10:12:56 | FromDiscord | <Phil> huh, that was the speed I had for encode.h |
10:13:00 | FromDiscord | <Phil> Types.h is still running strong |
10:13:13 | FromDiscord | <Elegantbeef> types.h is empty and useless |
10:13:16 | FromDiscord | <Phil> Look, I know my Lenovo T440 is a potato |
10:13:39 | FromDiscord | <Phil> Can't wait for the frame.work to finally arrive |
10:14:01 | * | jjido joined #nim |
10:14:41 | FromDiscord | <Phil> Okay I just CTRL+C'd it, there's no way it takes 5 minutes to decode a flipping 2 kb file, must've bugged out onme |
10:15:21 | FromDiscord | <Phil> Particularly not for like 70 lines of file |
10:15:52 | FromDiscord | <Elegantbeef> Ok so replacing `WEBPB_EXTERN` inside `encode.h` gets us on the path of proper code |
10:16:44 | FromDiscord | <Phil> What did you replace it with? |
10:16:58 | FromDiscord | <Elegantbeef> Nothing |
10:17:27 | FromDiscord | <Elegantbeef> It's for exporting C code |
10:18:52 | * | mjsir911 quit (Quit: Goodbye, World!) |
10:19:07 | * | mjsir911 joined #nim |
10:19:33 | FromDiscord | <Elegantbeef> Havent used c2nim much so i'm not the best to walk through it |
10:19:34 | FromDiscord | <Elegantbeef> Generally you want to make c2nim work with the C code so it can generate the wrapper |
10:20:23 | FromDiscord | <Phil> So for wrapping my choices are c2nim (I assume that one is preferred?) and wrapping myself |
10:21:12 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst there is the manual |
10:21:12 | FromDiscord | <Elegantbeef> You can try futhark, or nimterop |
10:21:20 | FromDiscord | <Elegantbeef> The code is relatively simple so wrapping yourself isnt a tremendous effort |
10:22:22 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3ONT |
10:22:28 | FromDiscord | <Elegantbeef> But i mean c2nim is faster ๐ |
10:22:34 | FromDiscord | <Phil> I'll do lunch, maybe let some time pass and in the end try wrapping myself simply because it'd mean learning more |
10:23:13 | FromDiscord | <Phil> It's faster but I think gaining some understanding before using tools that remove the step could be beneficial |
10:23:16 | FromDiscord | <Elegantbeef> Here's what the C file looked like https://play.nim-lang.org/#ix=3ONU |
10:23:18 | FromDiscord | <Phil> If I have to do tweaking either way |
10:23:40 | FromDiscord | <Elegantbeef> The tweaking isnt much |
10:23:45 | FromDiscord | <Phil> ... That was c2nim right? |
10:23:49 | FromDiscord | <Elegantbeef> Yea |
10:24:06 | FromDiscord | <Elegantbeef> You have to do a few things but it's relatively simple |
10:24:07 | FromDiscord | <Phil> For a second there I believed you hand translated literally 200 lines of code in less than a minute while talking with me |
10:24:14 | FromDiscord | <Elegantbeef> Lol |
10:24:48 | FromDiscord | <Elegantbeef> It will need a `{.push: header: "encode.h".}` and a `{.link: "libwebp.a".}` and the like for windows/mac |
10:25:17 | FromDiscord | <Phil> Ahhh check, so the header provides the proc signatures |
10:25:28 | FromDiscord | <Phil> And the pragma provides the point to where you actually call those procs |
10:25:46 | FromDiscord | <Phil> (edit) "And the pragma provides the point to where you actually call ... those" added "the content of" |
10:26:09 | FromDiscord | <Phil> Is that how all C works? A header to define the interface in your binary blob and then you just trust that header? |
10:26:36 | FromDiscord | <Elegantbeef> That's how libraries work yes |
10:26:46 | FromDiscord | <Elegantbeef> System libraries are declared using a C header, your programming language says "Ok that's what this library has" and then you use it like that |
10:27:50 | FromDiscord | <Elegantbeef> the `.a` file on linux is a static library which is compiled into the binary |
10:28:00 | FromDiscord | <Phil> Man |
10:28:04 | FromDiscord | <Elegantbeef> The fun part is you can relatively easily use this with pixie when it's wrapped |
10:28:46 | FromDiscord | <Elegantbeef> Use pixie to load png/jpegs, then pass them to webp to be output as you want |
10:28:54 | FromDiscord | <Phil> Short moment of contemplation here.โตIt really speaks for nim that as someone with no compsci experience that is just a python js java webdev can pick up nim and get a relatively complex project going and even start learning about C interop |
10:29:11 | FromDiscord | <Phil> (edit) removed "as" |
10:29:12 | FromDiscord | <Elegantbeef> Hey i'm 100% Self taught so... uhhh ๐ |
10:29:18 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzโฆ) |
10:29:38 | FromDiscord | <Elegantbeef> People learn what they need |
10:30:00 | FromDiscord | <Phil> I'm just gushing a bit about the really nice learn curve |
10:30:49 | FromDiscord | <Phil> for somebody that already has development experience. I think without that you'd have a tough time either way due to the sheer amount of concepts you have to understand like objects and such |
10:31:44 | FromDiscord | <Elegantbeef> Anyway hopefully this puts you on the path to doing the rest |
10:31:47 | FromDiscord | <Phil> Thanks for the nim file btw! I'll take a stab it and see if I can replicate it after lunch |
10:32:46 | FromDiscord | <Elegantbeef> You wont need it as messy as this but this is what you'll kinda want https://github.com/treeform/staticglfw/blob/master/src/staticglfw.nim#L1-L89 |
10:32:58 | FromDiscord | <Elegantbeef> linking the files per OS |
10:33:08 | FromDiscord | <Elegantbeef> passing any flags that are needed |
10:33:40 | FromDiscord | <Elegantbeef> Hopefully when you get around to it someone that knows better is around else i'll have to help tomorrow when i get on |
10:33:48 | FromDiscord | <Rika> With regards to the learning curve |
10:33:58 | FromDiscord | <Rika> I believe itโs just because you are interacting with the community |
10:34:15 | FromDiscord | <Rika> Otherwise itโs probably just as miserable or a little less as every other language |
10:35:27 | FromDiscord | <Elegantbeef> Probably more in this case |
10:35:38 | FromDiscord | <Elegantbeef> Cause converting C into Nim is pretty much a "Here are pragmas help yourself" |
10:36:51 | FromDiscord | <noow> i tried writing a game in C with sdl once |
10:37:03 | FromDiscord | <noow> i couldn't get it to link on windows with mingw |
10:37:09 | FromDiscord | <noow> worked first try on linux |
10:37:22 | FromDiscord | <noow> linking is an arch enemy of mine i guess |
10:37:39 | FromDiscord | <noow> (edit) "linking ... is" added "on windows" |
10:38:37 | FromDiscord | <Rika> It is for all of us |
10:38:45 | FromDiscord | <Rika> Itโs miserable there Iโd say |
10:39:09 | FromDiscord | <noow> oh? |
10:39:25 | FromDiscord | <noow> so it's not just me being stupid? |
10:40:12 | FromDiscord | <noow> the task that i was doing is actually non-trivial? wow |
10:40:27 | FromDiscord | <Rika> I mean I think it is trivial |
10:40:35 | FromDiscord | <Rika> Itโs just weโre all dumb |
10:40:50 | FromDiscord | <Rika> I guess that actually means itโs non trivial then lol |
10:44:34 | FromDiscord | <Phil> Regarding the learning curve I'm not sure I'd agree. โตYeah a lot of my journey is eased by asking you guys, but (outside of macros, that's a book with seven seals) a lot of those could reasonably also be solved by bashing my head against the problem for a couple hours. โตโตThe same just didn't hold true for Rust for me when i tried it out.You couldn't even get a damn settings import to work without feeling like half a master thesis to le |
10:44:57 | FromDiscord | <Rika> Rust is a massive outlier |
10:45:00 | * | jjido joined #nim |
10:45:11 | FromDiscord | <Rika> That motherfucker is essentially impossible to learn in a month or whatever |
10:45:38 | FromDiscord | <Rika> You probably would have a quicker learning experience if you got a lobotomy first before learning |
10:46:04 | FromDiscord | <Phil> I like to express it more like Rust's learning curve being a flat wall, but I fully agree with you |
10:46:18 | FromDiscord | <Phil> I think I just gave up after week 6 or sth |
10:47:26 | FromDiscord | <Rika> I tried it before too and yeah, itโs basically โyour brain better be made for this or you ainโt having funโ |
10:47:53 | FromDiscord | <Rika> There are a lot of nice concepts from rust that Iโd love for Nim to have |
10:49:20 | FromDiscord | <noow> if Rust's learning curve is a flat wall, Haskell's is angled backwards |
10:49:50 | FromDiscord | <Phil> Does nim have something for stupid easy parallelization? Like doing multi threaded work for a "map" operation on an array? I recall rust having a lib for that which was literally trivial to use |
10:49:53 | FromDiscord | <Rika> I learned Haskell easier than rust |
10:50:26 | FromDiscord | <Phil> Ray something or another it was called in rust IIRC |
10:52:12 | FromDiscord | <Rika> Probably weave is the closest to โdead easyโ |
10:52:27 | FromDiscord | <noow> would there be a problem with just using sequtils' map and threads |
10:53:31 | FromDiscord | <Rika> Well itโs not too easy to use just map and threads |
10:59:46 | FromDiscord | <Elegantbeef> Anyway i go to sleep |
10:59:47 | FromDiscord | <Elegantbeef> https://github.com/mratsim/weave#data-parallelismโต(@Phil) |
11:02:22 | FromDiscord | <Phil> In reply to @Elegantbeef "Anyway i go to": Sleep well!โตAlso looks really cool! |
11:02:32 | FromDiscord | <Rika> I was ignored sadge |
11:02:49 | FromDiscord | <Phil> I saw yours as well, I was just brought back by the ping because I was reading the weave docs at the time |
11:03:13 | FromDiscord | <apahl> In reply to @Isofruit "Does nim have something": Have a look at https://nim-lang.org/docs/system.html#%7C%7C.i%2CS%2CT%2CPositive%2Cstaticstring |
11:03:20 | FromDiscord | <Phil> Naturally thanks to you as well for the pointing out that got me to the initial finding |
11:03:45 | FromDiscord | <noow> why are there no compiler errors for procs that have a return type but 1. contain no return statements 2. no result = 3. no expression at the end |
11:04:25 | FromDiscord | <Rika> Implicit result = default(T) at the start |
11:04:34 | FromDiscord | <noow> any way to turn that off? |
11:04:38 | FromDiscord | <Rika> No |
11:04:44 | FromDiscord | <Rika> Not that I know of |
11:06:20 | FromDiscord | <Tetralux> sent a long message, see https://paste.rs/Zsz |
11:06:40 | FromDiscord | <Tetralux> (edit) "http://ix.io/3OO7" => "http://ix.io/3OO6" |
11:08:08 | FromDiscord | <noow> do we know that that library uses threads and not just coroutines/async |
11:08:34 | FromDiscord | <noow> ah nevermind i re-read the message |
11:08:40 | FromDiscord | <noow> sorry i am half asleep |
11:08:41 | FromDiscord | <Tetralux> If it doesn't use threads, it might not even be faster in the first place ๐ |
11:08:55 | FromDiscord | <Tetralux> In fact, probably likely not. ๐คฃ |
11:09:15 | FromDiscord | <noow> well if it's 10 I/O bound activities, maybe yes |
11:09:22 | FromDiscord | <noow> like 10 GUI elements |
11:09:33 | FromDiscord | <noow> altho arrays are a weird data structure for them |
11:42:49 | PMunch | Hmm, are there any way to see where a module is imported into my project? |
11:43:31 | PMunch | I try to run polymorph on a microcontroller but I get /home/peter/.choosenim/toolchains/nim-1.6.2/lib/pure/concurrency/cpuinfo.nim(100, 14) Error: undeclared identifier: 'sysconf' |
11:43:40 | PMunch | But I can't figure out where it is imported |
11:47:26 | FromDiscord | <Phil> Outside of running grep with an appropriate regex / opening that dir in vscode to search with a regex I can't think of anything |
11:47:45 | FromDiscord | <Phil> Assuming you can get the folder structure on your microcontroller onto a normal PC |
11:48:04 | FromDiscord | <Phil> It it must be CLI tools I can only think of grepping |
12:01:07 | * | jmdaemon quit (Ping timeout: 256 seconds) |
12:07:38 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/posix.html#sysconf%2Ccint |
12:11:49 | PMunch | Hmm, Nim really needs better tracking of when things are actually used.. |
12:12:15 | FromDiscord | <Phil> there's a nimgrep binary |
12:12:16 | FromDiscord | <Phil> No idea what it does |
12:12:21 | FromDiscord | <Phil> But has the word "grep" in the name |
12:12:49 | PMunch | Nimgrep is essentially a way to grep for things with Nims style insensitivity |
12:13:32 | PMunch | I found the error, it is a `from std/cpuinfo import countProcessors` |
12:13:50 | PMunch | But that happens in a macro of a branch that shouldn't be evaluated |
12:14:56 | PMunch | Oh wait, it's not in a macro |
12:15:04 | PMunch | Then I see why this doesn't work |
12:17:42 | PMunch | Bummer, I really wanted to see if I could get something like polymorph or pararules to run on an Arduino Uno, would be cool to have a completely different paradigm running on one of these controllers |
12:19:05 | PMunch | Pararules seemed to compile correctly, but it failed because the program it generated was too big |
12:26:06 | FromDiscord | <Phil> pmunch, are you familliar with c2nim? |
12:26:30 | FromDiscord | <Phil> Or how to figure out what a macro stands for |
12:26:41 | FromDiscord | <Phil> (edit) "Or how to figure out what a macro ... stands" added "in C in a header file" |
12:28:54 | PMunch | @Phil, familiar enough that I decided to not use it and wrote Futhark instead.. |
12:29:28 | FromDiscord | <Phil> Assuming I wanted to wrap this by hand |
12:29:38 | FromDiscord | <Phil> Because I'm dilligent and would like to have any comprehension of what I'm doing |
12:29:44 | PMunch | Oh you're into punishment? Kinky |
12:30:05 | FromDiscord | <Phil> It's 3 very small files |
12:30:13 | PMunch | But seriously, if you're diligent you want things to be done right, the manual process is very error prone |
12:30:13 | FromDiscord | <Phil> But for example |
12:30:24 | FromDiscord | <Phil> `WEBP_EXTERN int WebPPictureImportRGBX(`โตI've got this |
12:30:34 | FromDiscord | <Phil> I have no idea what WEBP_EXTERN is, I think it's a macro |
12:30:44 | PMunch | Do you know what is very good at reading and understanding C code? A C compiler, and Futhark uses Clang to read and understand the C files for you |
12:31:00 | PMunch | Mhm, Futhark knows what WEBP_EXTERN is |
12:31:04 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OON |
12:31:09 | FromDiscord | <Phil> How the heck did he know that macro turns into "static x"? |
12:31:20 | FromDiscord | <Rika> He probably didnโt |
12:31:40 | PMunch | It's probably a macro that turns on the `extern` flag in C under some conditions |
12:31:44 | FromDiscord | <Phil> But... but he added it to the encode.h file ! |
12:32:08 | FromDiscord | <Phil> That c2nim block wasn't there before, I'm comparing the two side by side at the moment to wrap my head around it |
12:32:23 | FromDiscord | <Phil> (edit) "That c2nim block wasn't there before, I'm comparing the two ... side" added "(original vs beefs version)" |
12:32:26 | PMunch | Do you know what you don't need to do if you use Futhark? Modify the .h source files |
12:33:07 | PMunch | That way you can just pull new versions and it automatically wraps the new version |
12:33:17 | * | PMunch waves hand and whispers *magic* |
12:33:40 | FromDiscord | <Phil> There's a subtle message somewhere in there |
12:33:42 | FromDiscord | <Phil> I can feel it |
12:34:23 | PMunch | This is at least one definition of it: https://github.com/webmproject/webp-wic-codec/blob/main/src/libwebp/webp/types.h#L39 |
12:34:36 | PMunch | It just adds `extern` to the definition |
12:34:57 | FromDiscord | <Phil> So he just looked through the source code for a definition and accordingly added the block? Huh |
12:35:00 | FromDiscord | <Phil> Fair |
12:35:26 | PMunch | Yup, whether or not he grabbed the correct one for your setup is anyones guess though |
12:36:21 | PMunch | Do you know what would grab the correct version so that you're guaranteed that it will work? Even if you change to a different system which has a different definition? You know like the DEFINE in C is supposed to do? |
12:36:36 | PMunch | I'll give you one guess |
12:37:45 | FromDiscord | <Phil> Is it... |
12:37:46 | FromDiscord | <Phil> hmm |
12:37:52 | FromDiscord | <Phil> I'll need to think on that one |
12:37:56 | FromDiscord | <Phil> Is it my internet connection? |
12:38:21 | FromDiscord | <Phil> Okay okay, fair I actually just read through the first 3 sections of the docs in the meantime |
12:39:21 | FromDiscord | <Phil> The current idea I'm getting is: open new project that uses futhark to deal with c and provides a nicer interface to anyone using it |
12:39:29 | FromDiscord | <Phil> (edit) "project" => "lib-project" |
12:39:37 | PMunch | Pretty much |
12:40:22 | FromDiscord | <Phil> ... nimble install futhark fails? Huh |
12:40:27 | PMunch | I mean I've used it directly a couple of times, but normally I create a module that uses Futhark to wrap a C library and add some utility functions/wrappers |
12:40:32 | PMunch | Fails with what? |
12:40:47 | FromDiscord | <Phil> Ohhh can't find clang |
12:40:49 | PMunch | Forgot to install libclang first? |
12:40:54 | FromDiscord | <Phil> yup |
12:41:26 | FromDiscord | <Phil> I just assumed ubuntu might already have it |
12:42:29 | FromDiscord | <Phil> hmmmm lclang |
12:46:41 | PMunch | Huh? |
12:46:56 | PMunch | apt install libclang-dev |
12:47:11 | PMunch | @Phil ^ |
12:47:46 | FromDiscord | <Phil> Huh, I tried sudo apt install clang |
12:48:17 | FromDiscord | <Phil> That installed... something worth 290Mb at least, still didn't make it compile. Libclang also installed something, lets see |
12:48:19 | PMunch | Yes, that gets you the clang compiler, not the clang library |
12:48:23 | * | kobi7 joined #nim |
12:48:32 | kobi7 | hi |
12:48:35 | PMunch | Hello |
12:48:48 | kobi7 | hey PMunch how are you doing? |
12:49:18 | PMunch | Pretty good, just chilling with some FOSDEM talks |
12:50:41 | kobi7 | cool |
12:50:57 | kobi7 | I am trying to stream from http. How do I do that in Nim? |
12:51:07 | kobi7 | https |
12:53:51 | kobi7 | nobody knows :-) |
12:54:06 | PMunch | Stream? |
12:57:20 | FromDiscord | <Phil> Welp, let's first go finding that libclang.lib file |
12:57:27 | FromDiscord | <Phil> Oh stream |
12:57:28 | FromDiscord | <Phil> Err |
12:57:43 | FromDiscord | <Phil> Yeah no idea, I stream audiofiles through apache because apache can, that's around it |
12:58:42 | kobi7 | I mean, as a client |
12:58:55 | kobi7 | this is what i want to do:https://lichess.org/api#operation/tvFeed |
12:59:25 | kobi7 | it works in curl, but not in nim, or i don't know how to do it |
13:00:17 | FromDiscord | <Phil> Errr fair, sadly can't help there, I use JS/HTML for my GUI when streaming audiofiles |
13:00:35 | FromDiscord | <Phil> Essentially it's Angular |
13:00:53 | PMunch | Make a request, get the response stream, and read it line by line? |
13:02:37 | kobi7 | it doesn't return |
13:02:50 | kobi7 | i think because it's a stream, so it's not over yet |
13:04:03 | kobi7 | a user asked this before here: https://forum.nim-lang.org/t/6103 |
13:04:28 | kobi7 | but recvLine shows nothing... a mystery! |
13:04:43 | FromDiscord | <Phil> Okay I'm dumb, I can't find a `libclang.lib` file. I can find my clang dir with the clang binary in `/usr/lib/llvm-6.0/bin` |
13:05:23 | PMunch | @Phil, yes that is the clang compiler, not the clang library |
13:05:41 | PMunch | And you're not looking for a .lib file, you're looking for a .so file |
13:06:09 | PMunch | But you shouldn't have to look for it at all, if you installed it via apt like I showed you earlier I think it should find it automatically |
13:06:18 | FromDiscord | <Phil> Found it |
13:06:29 | kobi7 | is there a way to get more verbose information from the socket? |
13:07:46 | FromDiscord | <Phil> sent a long message, see http://ix.io/3OOW |
13:08:44 | PMunch | @kobi7, well you can use Wireshark |
13:09:41 | PMunch | @Phil, do you have a file called /usr/lib/libclang.so? |
13:10:46 | FromDiscord | <Phil> nope, I've got /usr/lib/llvm-6.0/lib/libclang.so though |
13:13:58 | FromDiscord | <Phil> just made a symlink (`ln -s /usr/lib/llvm-6.0/lib/libclang.so /usr/lib`) to try it out but that didn't change anything, hmm |
13:14:25 | PMunch | Ah, try --passL:"-L/usr/lib/llvm-6.0/lib" |
13:14:38 | FromDiscord | <Phil> Wait, quotation marks? |
13:14:48 | FromDiscord | <Phil> That might explain a lot |
13:15:22 | PMunch | Not sure if you need them tbh |
13:15:26 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzโฆ) |
13:17:44 | FromDiscord | <Phil> That did it, may I make a pull request to adjust the command in the readme from `nimble install --passl:-L<path to libclang.lib> futhark` to `nimble install --passL:"-L<path to libclang.lib>" futhark` and maybe as an example for the pattern `nimble install --passL:"-L/usr/lib/llvm-6.0/lib" futhark` |
13:17:50 | FromDiscord | <Phil> (edit) "That did it, may I make a pull request to adjust the command in the readme from `nimble install --passl:-L<path to libclang.lib> futhark` to `nimble install --passL:"-L<path to libclang.lib>" futhark` and maybe as an example for the pattern `nimble install --passL:"-L/usr/lib/llvm-6.0/lib" futhark` ... " added "?" |
13:19:10 | kobi7 | it seems only curl works |
13:21:42 | PMunch | Those instructions are actually for Windows |
13:22:00 | PMunch | "To install Futhark you first need to have clang installed. On Linux this is as simply as just grabbing it from your package manager." |
13:22:09 | PMunch | That's the only part of that which applies to Linux |
13:22:16 | PMunch | But yes, feel free to rewrite that section :) |
13:29:57 | kobi7 | hmm.. doesn't work. no matter |
13:31:59 | FromDiscord | <Phil> Actually, pmunch, ignore my PR, I'll add another commit to it to split linux and windows section |
13:33:47 | * | kobi7 quit (Quit: Leaving) |
13:35:51 | PMunch | Hmm, just watched an interesting talk on GUI in Ada |
13:36:36 | PMunch | One takeaway which I thought was interesting is that he added all GUI events to a queue instead of using callbacks |
13:37:06 | PMunch | This meant that his main program was essentially just a simple state machine that could go between states that handled various events and discarded any other events |
13:37:27 | PMunch | And it should be able to handle pretty much any UI layer on top |
13:37:48 | PMunch | I think I might have found one of the missing puzzle pieces for my Nim GUI library |
13:39:29 | FromDiscord | <Phil> Alright, did the minimal readme update |
13:48:53 | FromDiscord | <BhamidipatiNikhil> This code that i wrote is outputting EOF error in the nim playground.... https://media.discordapp.net/attachments/371759389889003532/939880330792402944/unknown.png |
13:49:16 | FromDiscord | <BhamidipatiNikhil> but working fine in my vscode environment https://media.discordapp.net/attachments/371759389889003532/939880426221223997/unknown.png |
13:49:50 | FromDiscord | <BhamidipatiNikhil> I am using the same version of nim(1.6.2) in both.... Any idea guys why this is happening? |
13:51:30 | FromDiscord | <BhamidipatiNikhil> Actually i received runtime error on the atcoder.jp platform too... I have no idea why this EOF error is coming... |
13:52:50 | PMunch | Really hard to know without seeing the code |
13:53:24 | PMunch | But the playground is a fairly limited environment, just the fact that you managed to get an EOF without really having any files available is interesting |
13:56:00 | FromDiscord | <BhamidipatiNikhil> sent a code paste, see https://play.nim-lang.org/#ix=3OPe |
13:56:22 | FromDiscord | <Phil> \`\`\`nimโต\`\`\` |
13:56:50 | FromDiscord | <Phil> works on github, stackoverflow (well, not for nim but most other language) and maybe even reddit |
13:57:41 | FromDiscord | <Phil> essentially just write the language (here nim) after the backticks |
13:58:19 | FromDiscord | <Phil> Given that you're crashing playground though, you could just post a link from there that contains your code |
13:58:23 | FromDiscord | <BhamidipatiNikhil> sent a code paste, see https://play.nim-lang.org/#ix=3OPi |
13:58:28 | * | jjido joined #nim |
13:58:59 | FromDiscord | <Phil> yeeeeee playground link might be a better idea |
14:00:11 | FromDiscord | <BhamidipatiNikhil> In reply to @Isofruit "yeeeeee playground link might": https://play.nim-lang.org/#ix=3OPj |
14:01:54 | FromDiscord | <BhamidipatiNikhil> https://atcoder.jp/contests/abc238/tasks/abc238_e This is the problem i was attempting to solve! |
14:02:08 | FromDiscord | <Phil> I have some fundamental questions on why you're even using templates |
14:02:28 | FromDiscord | <Phil> But that's not the point |
14:03:02 | PMunch | And there you have your problem, line 112 as it says: stdin.readLine |
14:03:23 | PMunch | The playground doesn't send anything to the program over stdin, so it doesn't have anything to read |
14:04:35 | FromDiscord | <Phil> Ah, dang, Pmunch was faster |
14:04:53 | FromDiscord | <Phil> Just got to that point |
14:05:02 | FromDiscord | <BhamidipatiNikhil> I gave input in the atcoder platform.... https://media.discordapp.net/attachments/371759389889003532/939884392627707924/unknown.png |
14:05:27 | FromDiscord | <BhamidipatiNikhil> Still the same error https://media.discordapp.net/attachments/371759389889003532/939884500769472572/unknown.png |
14:06:28 | FromDiscord | <enthus1ast> well you must break out of your iterator |
14:07:17 | FromDiscord | <BhamidipatiNikhil> In reply to @Isofruit "I have some fundamental": I was using templates because i wanted just readability of code here... and i know i was not applying any procedure...! |
14:07:27 | FromDiscord | <BhamidipatiNikhil> In reply to @enthus1ast "well you must break": Which line... line number? |
14:08:53 | FromDiscord | <enthus1ast> from what i see in the images line 8 |
14:09:39 | FromDiscord | <enthus1ast> might be as easy as catch the EOFError and break |
14:11:23 | FromDiscord | <BhamidipatiNikhil> sent a code paste, see https://play.nim-lang.org/#ix=3OPr |
14:11:49 | FromDiscord | <BhamidipatiNikhil> In reply to @enthus1ast "from what i see": Line 8 worked very well lot of times! |
14:12:37 | FromDiscord | <BhamidipatiNikhil> currently its commented out.. https://media.discordapp.net/attachments/371759389889003532/939886300444643389/unknown.png |
14:12:56 | FromDiscord | <BhamidipatiNikhil> Still the same error!! EOF error! |
14:15:55 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzโฆ) |
14:17:08 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3OPw |
14:17:58 | FromDiscord | <BhamidipatiNikhil> This one? https://media.discordapp.net/attachments/371759389889003532/939887648879820820/unknown.png |
14:18:03 | * | jjido joined #nim |
14:18:31 | FromDiscord | <Rika> yes |
14:18:41 | FromDiscord | <Rika> its reading too much info |
14:21:35 | * | jjido quit (Client Quit) |
14:22:38 | FromDiscord | <Waldecir Santos> How do I set async pragma in a proc var ? I'm doing this and no luck |
14:22:46 | FromDiscord | <Waldecir Santos> sent a code paste, see https://play.nim-lang.org/#ix=3OPy |
14:22:58 | FromDiscord | <BhamidipatiNikhil> 2 inputs.... is that too much? https://media.discordapp.net/attachments/371759389889003532/939888903563927573/unknown.png |
14:23:04 | FromDiscord | <BhamidipatiNikhil> 2 per line |
14:24:21 | FromDiscord | <enthus1ast> this code works for meโต(@Waldecir Santos) |
14:24:49 | FromDiscord | <Waldecir Santos> Oh I need to import asyncdispatch I keep forgetting the imports ๐คฆโโ๏ธ |
14:24:56 | FromDiscord | <enthus1ast> \:) |
14:25:07 | NimEventer | New thread by Icedquinn: Using distinct types for windowed access (ex. index operator abuse), see https://forum.nim-lang.org/t/8871 |
14:25:23 | FromDiscord | <Waldecir Santos> Ty |
14:27:11 | * | pro quit (Quit: pro) |
14:29:21 | * | arkurious joined #nim |
14:37:22 | FromDiscord | <Phil> Okay |
14:37:50 | FromDiscord | <Phil> so of futhark I comprehend so far that I can use either "path" or "absPath" to define the directory that contains the header files I want to import |
14:38:35 | FromDiscord | <Phil> (edit) "so of futhark I comprehend so far that ... I" added "within the `importc` macro" |
14:39:20 | FromDiscord | <Phil> I use define for... sth? I have no comprehension of what goes in there. Is that a name of sth in the C-file? Can I just name that whatever I want? |
14:39:35 | FromDiscord | <Phil> And at the end of the block I give the name of the header file |
14:40:07 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/0SL |
14:40:11 | FromDiscord | <Phil> I think? Pmunch? |
14:42:40 | PMunch | Sounds about right |
14:42:42 | FromDiscord | <Phil> For reference, this is in a file `/home/isofruit/dev/nimlibwebp/src/nimblibwebp/libwebp.nim`โตThe resources folder is in `/home/isofruit/dev/nimlibwebp/resources/libwebp-1.2.2-linux-x86-64/include/webp` |
14:42:52 | FromDiscord | <Phil> The docs said path is relative to the project |
14:43:17 | PMunch | `define` adds C `#DEFINE` statements to your import. This is sometimes used similarly to how we do `-d:something` in Nim |
14:43:22 | FromDiscord | <Phil> I'm not sure whether that means relative to the file that calls futhark or the root folder of the project (which would be `/home/isofruit/dev/nimlibwebp` |
14:44:09 | PMunch | Uhm, should be relative to the root of the project IIRC |
14:44:25 | PMunch | Or maybe the main module of the compilation |
14:44:48 | FromDiscord | <Phil> Check, so that path should just start with /resources or start with ../resources |
14:44:56 | FromDiscord | <Phil> I'll keep that in mind! |
14:48:25 | FromDiscord | <Phil> Fun fact, the level to which I acknowledged "-d" so far was "Ah, when I pass this I can manipulate the mode in which my program is compiled", I saw it as little more than just a flag that you can access within the code to see if it's defined or not like a normal flag |
14:49:27 | FromDiscord | <Phil> Just namespaced so that custom flag stuff can be dealt with in any -d flag |
14:49:38 | FromDiscord | <Phil> (edit) "Just namespaced so that custom flag stuff can be dealt with in any -d flag ... " added "while the rest stays reserved for nim in general" |
14:51:23 | FromDiscord | <Phil> Either way, that looks to me like it's a way to manipulate how the lib is called and not if I just want to use it without any special flags |
14:51:32 | FromDiscord | <Phil> (edit) "flags" => "flags. So for now not necessary" |
14:51:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OPQ |
14:52:34 | PMunch | Well I mean that is pretty much how the -d flag works |
14:52:48 | PMunch | It's just a way to define arbitrary values to things during compile-time |
14:53:48 | PMunch | You probably need an absPath to the clang stdlib as well |
14:53:52 | PMunch | Like I do in my example |
14:54:03 | PMunch | Otherwise it won't be able to find the definition of normal C types :P |
14:54:11 | FromDiscord | <Phil> Ahhhh fair |
14:54:49 | FromDiscord | <Phil> ... if I ever make this a public package I'll likely have to have the user pass that as an argument somehow, whatever they're compiling for |
14:55:35 | FromDiscord | <Phil> Because I think throwing the clang stdlib into the package might make it too large |
15:01:19 | FromDiscord | <Phil> ... at least I think that generates source code? |
15:01:22 | FromDiscord | <Phil> (edit) "https://paste.rs/yx4" => "https://paste.rs/iry" |
15:01:27 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/Ii4 |
15:02:41 | FromDiscord | <Goel> We want a full tutorial on "How to use Futhark" asap |
15:03:23 | FromDiscord | <enthus1ast> lolโต(@Goel) |
15:03:29 | FromDiscord | <Phil> I'll... write an example.md file for pmunch from whatever I learn? |
15:04:15 | FromDiscord | <Phil> I think I'm just severely limited here because this is pretty much the first time I'm even interacting with C or any low level language for the matter, a lot of the moving parts are whiffing past me |
15:05:09 | PMunch | @Phil, if you have a dynamic library you don't need that part |
15:05:20 | PMunch | Simply `passL:"-lmylib"` |
15:05:40 | PMunch | That' just a little bit of logic to compile stb and link it statically |
15:05:59 | PMunch | @Goel, I definitely should.. |
15:06:40 | PMunch | And @Phil, you don't have to worry about the clang libraries, they don't get included in your Futhark output, clang just needs to know about them when it is compiling |
15:07:01 | FromDiscord | <Phil> Errr.... I think weblibp is static? Beef mentioned something like that, let me read in the docs if that's mentioned somewhere |
15:07:27 | FromDiscord | <Phil> Oh, it has both dynamic and static libs |
15:08:32 | PMunch | Yeah you probably just need to pass -lwebp on compile-time as long as you have it installed |
15:08:59 | PMunch | Yup, at least on Arch |
15:09:35 | FromDiscord | <Phil> With dynamic library being the superior option for it means that lib is only called as needed and can be updated independently of my wrapper |
15:10:39 | FromDiscord | <Phil> Wait, that means what I did with putting a resources folder into my project was pointless |
15:11:46 | FromDiscord | <Phil> Because I should have the weblibp in... one of my system's lib folders I think and use the path to that weblibp folder to get the header file |
15:21:54 | PMunch | Yes |
15:24:57 | FromDiscord | <Phil> Alright I'll go with static for now. Mostly because I misunderstood and if you want to compile the binary with dynamic linking you'll have to do it yourself, so I've got no .dll files in the folder I downoaded, only .a |
15:25:59 | FromDiscord | <Phil> (edit) "Alright I'll go with static for now. Mostly because I misunderstood and if you want ... tothem" added "compiled weblibp dll filesyou'll have" | "the binary with dynamic linking you'll have to do it" => "them" |
15:26:06 | FromDiscord | <adokitkat> Hi, a quick question, I couldn't find it. How do I "unpack" a seq of strings to fill a proc varargs parameter? |
15:26:25 | FromDiscord | <adokitkat> (edit) "it." => "answer." |
15:26:41 | PMunch | @adokitkat, I think you can just pass a seq to a varargs parameter directly |
15:27:11 | FromDiscord | <Rika> yeah, you dont need to "unpack" it |
15:27:20 | PMunch | @Phil, you're on Linux, if you end up with .dll files you've done something very wrong |
15:27:40 | FromDiscord | <Rika> on linux shared/dynamic libs are .so |
15:27:45 | PMunch | If you install libwebp through your package manager you should have libwebp.so in your /usr/lib folder |
15:28:01 | PMunch | And then it's just a matter of `--passL:"-lwebp"` and it should find it |
15:28:30 | FromDiscord | <Phil> Sadly not in apt |
15:28:37 | FromDiscord | <adokitkat> In reply to @PMunch "<@216745055770116106>, I think you": that is unfortunately broken |
15:28:47 | PMunch | For Futhark though you do need some header files to generate the definitions, these are typically installed under "/usr/include/webp" for example |
15:28:58 | FromDiscord | <adokitkat> atleast in one gintro function |
15:29:28 | FromDiscord | <Rika> In reply to @Isofruit "Sadly not in apt": debian based distros usually dont have the best package list |
15:30:03 | PMunch | So if you just name them and then `--passC:"-I/usr/include/webp"` I believe clang should find the .h file directly |
15:30:03 | FromDiscord | <Phil> Currently checking if I can have apt install the package for me by passing it the url somehow |
15:30:29 | PMunch | `apt install libwebp` didn't work? |
15:30:54 | FromDiscord | <adokitkat> there is a varargs parameter but it is a binding to C's GTK3 and when I pass a seq there it just passes it literally like "@[abc]" as a whole string |
15:30:57 | FromDiscord | <Phil> > Reading package lists... Doneโต> Building dependency tree โต> Reading state information... Doneโต> E: Unable to locate package libwebp |
15:31:03 | FromDiscord | <adokitkat> when I pass only one string, it works good |
15:31:20 | FromDiscord | <Phil> Did find a command that can add a repository though |
15:32:42 | FromDiscord | <Phil> Oh screw me it's called libwebp-dev |
15:32:46 | FromDiscord | <Rika> libwebp-dev? |
15:32:47 | FromDiscord | <Rika> yeah |
15:32:48 | FromDiscord | <Rika> i was thinking |
15:32:49 | FromDiscord | <Rika> lmao |
15:33:02 | FromDiscord | <Rika> maybe use apt search first next time ๐ |
15:33:39 | FromDiscord | <Phil> I've honestly never ever had to |
15:34:03 | FromDiscord | <Phil> package was either named so I got it the first time or the webpage of the package included the package name to look for |
15:36:20 | FromDiscord | <pmunch> Typically development headers and such normally have the -dev postfix on Ubuntu |
15:36:48 | FromDiscord | <Phil> ~~Learning about the C ecosystem is the hardest part of this exercise~~ |
15:43:05 | FromDiscord | <Phil> one import c per header file I assume |
15:43:11 | FromDiscord | <Phil> (edit) "import c" => "importc call" |
15:50:49 | * | jjido joined #nim |
15:53:01 | FromDiscord | <Skeleton> Im trying to install Nim from nim-lang.org, specifically the 64 bit version for use on Win10 and Windows defender is flagging some part of it as "potentially unwanted software"โตIs this normal?โตIt says the file in question is called `Program:Win32/Uwamson.A!ml` |
15:53:23 | FromDiscord | <Skeleton> Im a noob so sorry if I left out some important info |
15:54:16 | FromDiscord | <Rika> it is a false positive. av heuristics are not very smart |
15:55:34 | FromDiscord | <Skeleton> Ah, thanks. Should be all safe then? |
15:57:57 | FromDiscord | <auxym> Yes, there's a long forum thread on the issue |
15:58:07 | FromDiscord | <Phil> Pretty much. What you're describing is sadly a known issue but neight impossible to properly fix since AV's are just throwing machine learning and flagging everything that isn't on a tree by the count of three |
15:58:15 | FromDiscord | <Phil> (edit) "neight" => "neigh" |
15:58:27 | FromDiscord | <Phil> (edit) "Pretty much. What you're describing is sadly a known issue but neigh impossible to properly fix since AV's are just throwing machine learning ... and" added "at everything" |
15:58:29 | FromDiscord | <auxym> https://forum.nim-lang.org/t/7885 |
15:59:24 | FromDiscord | <auxym> short story is, some people wrote exploits in Nim, now AVs are flagging a bunch of stuff compiled by Nim as a virus |
15:59:37 | * | Gustavo6046 quit (Remote host closed the connection) |
16:00:29 | FromDiscord | <Skeleton> Sad. I've only used Ruby so far but after looking into some other languages, Nim looks very promising. I am going to try it anyways, I believe you guys. |
16:00:42 | * | Gustavo6046 joined #nim |
16:00:47 | FromDiscord | <Skeleton> Eventually I am going to switch to some linux distro instead of Win10 and then it wont be an issue I imagine |
16:02:16 | FromDiscord | <Phil> Pretty much |
16:05:39 | FromDiscord | <Skeleton> While Im around, can you guys suggest any digital books that go over Nim's features? Often times when Im not at home I used to read a pdf on a kindle about Ruby to try and understand more, It would be nice to have a Vim equivalent but It seems that Vim is much lower population than Ruby |
16:05:53 | FromDiscord | <Phil> On the one hand, I'm pretty sure giving my normal user write access to `/usr/bin` is a bad idea |
16:06:10 | FromDiscord | <Phil> On the other, it is really annoying me I can't do `nimble install futhark` without sudo |
16:07:54 | FromDiscord | <Phil> https://www.manning.com/books/nim-in-actionโตโตNot a free book, but a book. |
16:13:20 | FromDiscord | <Phil> ... I've been stupid with futhark somewhere |
16:13:27 | FromDiscord | <Skeleton> In reply to @Isofruit "https://www.manning.com/books/nim-in-action Not a": Thank you! |
16:13:36 | FromDiscord | <Phil> > Error: Unable to parse output of opir:โต> /bin/sh: 1: opir: not found |
16:13:48 | FromDiscord | <Phil> Back to reading the docs ! |
16:20:33 | FromDiscord | <pmunch> Nope, you can list as many headers as you like in one callโต(@Phil) |
16:21:16 | FromDiscord | <pmunch> How did you install it? If you have the .nimble/bin folder in your path then that should workโต(@Phil) |
16:24:08 | FromDiscord | <Phil> sent a long message, see http://ix.io/3ORM |
16:26:28 | FromDiscord | <Phil> sent a long message, see http://ix.io/3ORN |
16:28:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3ORO |
16:29:34 | NimEventer | New thread by Sekao: Two-way communication with the new ORC-friendly channels, see https://forum.nim-lang.org/t/8872 |
16:44:27 | PMunch | Uhm, you shouldn't install nimble packages with ude |
16:44:28 | PMunch | sudo* |
16:44:53 | PMunch | That probably put them in the root users home folder and not in your users home folder where they're supposed to go |
16:45:17 | FromDiscord | <Phil> So the solution thus is to changing permissions it seems |
16:48:33 | FromDiscord | <Phil> In reply to @PMunch "That probably put them": Hmmm okay, the error message for not installing with sudo changed to this:โต> Error: unhandled exception: cannot open: /home/isofruit/.cache/nim/opir_r/opir.json [IOError]โต... I'll just give myself read and write to `~/.cache` |
16:49:45 | PMunch | Uhm, try deleting that folder instead |
16:50:02 | PMunch | Probably when you ran as sudo you messed up the permissions in that folder |
16:50:20 | PMunch | Just "sudo rm -rf /home/isofruit/.cache/nim/opir_r" |
16:50:22 | FromDiscord | <Phil> huh |
16:50:25 | FromDiscord | <Phil> Yeah that did it |
16:50:38 | FromDiscord | <Phil> just sudo rm -r ~/.cache |
16:51:07 | Amun-Ra | sudo and ~? |
16:51:43 | FromDiscord | <Phil> ah, sorry, I was already in the correct dir, yeah that would lead to the wrong thing |
16:51:56 | FromDiscord | <Phil> So strictly speaking "sudo rm -r .cache" |
16:52:07 | FromDiscord | <Phil> Since my cwd was /home/isofruit |
17:02:37 | FromDiscord | <Phil> Oh wow |
17:02:51 | FromDiscord | <Phil> Rika wasn't kidding when they said debian doesn't use the most up to date libs |
17:03:34 | FromDiscord | <Phil> Just realized the example has clang 12.0, meanwhile my default install of clang is 6.0 |
17:03:41 | FromDiscord | <Rika> lol |
17:03:46 | PMunch | 6.0? |
17:04:14 | FromDiscord | <Phil> > /usr/lib/llvm-6.0/lib/clang/6.0.0 |
17:04:22 | PMunch | From 2018 :P |
17:04:54 | PMunch | Meanwhile my machine has updated to 13.0.0 |
17:05:14 | FromDiscord | <Phil> Flexing his fancy arch up-to-datedness ๐ |
17:05:15 | FromDiscord | <cigolog> One can import nim modules inside python via nimpy and nimporter. Is there some library to do the opposite - use python code inside nim? |
17:06:42 | FromDiscord | <Phil> HAH! New error message! |
17:07:38 | FromDiscord | <Phil> cigolog there's nimpy (I have not used it): https://github.com/yglukhov/nimpy |
17:09:29 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3ORX |
17:09:58 | FromDiscord | <Yepoleb> In reply to @Isofruit "Just realized the example": you can pin that specific package to testing or unstable |
17:10:05 | FromDiscord | <apahl> In reply to @cigolog "One can import nim": Nimpy can do that as well. |
17:10:21 | FromDiscord | <Yepoleb> or just upgrade fully to unstable, i wouldn't do development work on stable |
17:10:29 | FromDiscord | <Yepoleb> it's just a pain |
17:10:34 | FromDiscord | <cigolog> In reply to @apahl "Nimpy can do that": How does it deal with the fact most python code lacks type annotations? |
17:11:20 | FromDiscord | <Phil> In reply to @Yepoleb "or just upgrade fully": I've never ever done any work with C whatsoever, so I assume that's... a flag in apt somewhere to point the repositories to more up-to-date stuff? |
17:11:56 | FromDiscord | <apahl> In reply to @cigolog "How does it deal": Sorry, I am not familiar with the inner workings of Nimpy, just know about this: https://github.com/yglukhov/nimpy#calling-python-from-nim |
17:12:15 | FromDiscord | <Yepoleb> are you familiar with apt beyond basic commands? |
17:13:05 | FromDiscord | <Phil> Not really, apt search, apt autoremove/autoclean/clean, apt install, apt update, apt upgrade, them's the basics and I didn't go much beyond. |
17:15:05 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzโฆ) |
17:15:37 | FromDiscord | <cigolog> In reply to @apahl "Sorry, I am not": Looking into tests, it seems like it only honors standard python lib |
17:18:18 | FromDiscord | <Yepoleb> so debian has these 3 branches:โตunstable, where packages are introduced, this is kinda like the arch branchโตtesting, where unstable packages go once there are no major bugs anymoreโตstable, which is released every couple years as a polished snapshot of testing and only gets stability and security updates, no new versions |
17:18:45 | FromDiscord | <Yepoleb> you specify the branches you want to have available in /etc/apt/sources.list |
17:19:44 | FromDiscord | <apahl> In reply to @cigolog "Looking into tests, it": I guess that is just because it would be difficult to maintain tests on non-stdlib packages? |
17:19:59 | FromDiscord | <Phil> In reply to @Yepoleb "you specify the branches": Checking, reading through that file atm |
17:20:49 | FromDiscord | <Yepoleb> https://wiki.debian.org/DebianTesting this is a more in-depth summary of how the debian release cycle works |
17:24:52 | PMunch | @Phil https://github.com/PMunch/futhark/issues/11 |
17:25:20 | PMunch | Essentially there's a bug in the current stable version of Nim (1.6.2). Try the release candidate for 1.6.4, or use devel |
17:25:30 | PMunch | https://github.com/PMunch/futhark/issues/11#issuecomment-1018470611 |
17:27:25 | FromDiscord | <Yepoleb> @Phil imo for development you should use at least testing, because a stable release will keep the same old library version indefinitely (which is also the whole point of it, you don't want to update a server and a new version introduces new bugs) |
17:34:57 | * | jjido joined #nim |
17:36:55 | * | Gustavo6046_ joined #nim |
17:38:03 | * | Gustavo6046 quit (Ping timeout: 256 seconds) |
17:43:22 | FromDiscord | <Ayy Lmao> Is it possible to send a ref through a c api expecting a void pointer? I'm trying to send it in with `addr` and then cast it back on the other side but I'm getting out of bounds errors. |
17:44:21 | PMunch | It should work, but refs are GCed so you need to make sure the object you have a ref to isn't being GCed while in C-land |
17:45:13 | FromDiscord | <Ayy Lmao> I'm building to emscripten and running `--gc:arc` so maybe that has something to do with it? |
17:46:19 | FromDiscord | <Phil> In reply to @Yepoleb "<@!180601887916163073> imo for development": I'll potentially play around with debian testing or so on my next machine. Since I have a new one incoming in the next couple weeks I don't think I'm willing to invest the time to do it right now |
17:48:48 | PMunch | @Ayy_Lmao, do you keep a reference to it when you pass it off to C-land? |
17:49:16 | PMunch | Or do you just allocate an object in Nim, pass the pointer to a C library, and then let Nim forget about it at which point it deallocates it? |
17:49:55 | FromDiscord | <Phil> Oh... oh wow, choosenim update devel really hammers your CPU |
17:51:31 | FromDiscord | <Ayy Lmao> In reply to @PMunch "Or do you just": I'm keeping a reference to it. I'm trying to pass it to `emscripten_set_mousedown_callback` and get back the reference inside that callback. I might be making a problem where there isn't one though, I have a couple other things I can try. |
17:52:36 | PMunch | @Phil, yes it compiles Nim. The GCC compiler likes CPU cycles :P |
17:52:54 | FromDiscord | <Ayy Lmao> Yeah it seems to work to store a hash table of pointer to references and get the reference from the table instead of trying to cast to it |
17:53:13 | PMunch | I think you where just doing it wrong somehow.. |
17:53:40 | PMunch | But it's hard to tell without any code |
17:55:13 | * | Gustavo6046_ is now known as Gustavo6046 |
17:55:39 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3OSb |
17:56:45 | FromDiscord | <Phil> Well... new nim new error, let me check first if that already has an issue |
17:58:09 | FromDiscord | <Phil> Cache clearing was once more the issue, that fixed it yehaw |
18:00:01 | FromDiscord | <Phil> sent a long message, see http://ix.io/3OSf |
18:01:31 | FromDiscord | <Phil> (edit) "http://ix.io/3OSf" => "http://ix.io/3OSj" |
18:11:33 | PMunch | It's definitely one of those two |
18:12:42 | PMunch | Could you share you libwebp.nim file and I could try to build it here |
18:12:51 | PMunch | That would narrow it down to one possibility |
18:12:58 | FromDiscord | <Phil> Sure, it's like 6 lines |
18:13:10 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OSl |
18:16:36 | PMunch | Compiles fine here |
18:17:02 | PMunch | For me it looks like this: http://ix.io/3OSm |
18:18:24 | PMunch | By the way, you can just delete `/home/isofruit/.cache/nim/project_d/r` |
18:18:44 | PMunch | Uhm, that is d/r as in -d:debug or -d:release |
18:19:01 | PMunch | You don't have to wipe the cache of every single program on your machine |
18:21:20 | FromDiscord | <Phil> No think!โตJust delete! |
18:21:51 | PMunch | `sudo rm -rf /` woooo |
18:21:56 | PMunch | Did that by mistake once.. |
18:22:13 | FromDiscord | <Phil> it's an older meme, but of quality |
18:22:28 | PMunch | I think actually new version of rm doesn't allow you to do that :P |
18:22:34 | FromDiscord | <Phil> I didn't do that, I did delete some central dir once though |
18:22:55 | FromDiscord | <Phil> Don't recall which one anymore though, I think after that my sudo just was nonexistant |
18:48:48 | FromDiscord | <mlokis> something pinged me , do you know what it was? |
18:48:59 | FromDiscord | <mlokis> on this channel of cource |
18:49:06 | FromDiscord | <mlokis> (edit) "cource" => "course" |
18:49:22 | FromDiscord | <Phil> When did you last look? |
18:49:29 | FromDiscord | <huantian> you can do a mentions search in discord |
18:49:31 | FromDiscord | <Phil> Because there was a ping yesterday for FOSDEM talks |
18:49:48 | FromDiscord | <huantian> ^ it was probably that though |
18:52:28 | PMunch | @Phil, I hade once unpacked the root structure for an SD card I was going to boot from. And by accident I copied the whole thing not into `./` as I had intended, but rather to `/`. So `sudo cp` set to work copying all the nice ARM binaries into my x86 system.. |
18:52:30 | PMunch | That was fun |
18:58:08 | FromDiscord | <Yepoleb> a friend once ran `chmod -R 777 /` because he got tired of using root to change files |
18:58:48 | FromDiscord | <Yepoleb> unfortunately a lot of tools check config file permissions and the system was unrecoverable |
18:59:28 | FromDiscord | <Yepoleb> like you can't sudo if the sudoers file is writable by everyone |
19:01:01 | FromDiscord | <slackaduts> sent a code paste, see https://play.nim-lang.org/#ix=3OSy |
19:06:37 | FromDiscord | <demotomohiro> I forget `^=` in python. |
19:07:09 | FromDiscord | <slackaduts> I loved it for "toggling" boolean values |
19:08:05 | NimEventer | New thread by Planetis: Is it a good idea to downcast Hash, see https://forum.nim-lang.org/t/8873 |
19:08:10 | nrds | <Prestige99> Like, foo = not foo? |
19:08:58 | FromDiscord | <slackaduts> i can't tell who's a person here and who's a regular bot lmao |
19:10:56 | FromDiscord | <Phil> Nimevener is bot |
19:11:06 | FromDiscord | <Phil> nrds is a portal for prestige to talk through to us |
19:11:09 | FromDiscord | <Phil> (edit) "to" => "with" |
19:11:30 | FromDiscord | <Phil> (edit) "Nimevener" => "Nimeventer" |
19:11:46 | FromDiscord | <slackaduts> In reply to @nrds "<Prestige> Like, foo =": foo ^= TrueโตIIRC is the same as setting it to true if it's false, and setting it to false if it's true |
19:12:18 | FromDiscord | <demotomohiro> So `^` is used as bitwise xor operator in both C and python. Nim has `xor` binary bitwise xor operator. |
19:12:53 | FromDiscord | <demotomohiro> But Nim doesn't have `xor=` operator. |
19:13:02 | FromDiscord | <slackaduts> damn |
19:13:21 | nrds | <Prestige99> `foo = not foo` should work for that use case though |
19:13:26 | FromDiscord | <slackaduts> oh |
19:14:49 | FromDiscord | <Phil> The way prestige wrote it also looks a lot more readable to me |
19:15:04 | FromDiscord | <slackaduts> yeah |
19:17:28 | FromDiscord | <Phil> ... I maybe should've updated to ubuntu 20 sooner |
19:17:29 | FromDiscord | <Phil> maybe |
19:17:39 | FromDiscord | <slackaduts> I used to use ubuntu |
19:17:49 | FromDiscord | <slackaduts> like 7 years ago |
19:17:52 | FromDiscord | <slackaduts> (edit) "like 7 years ago ... " added "roughly" |
19:18:23 | FromDiscord | <Phil> It's been doing its job pretty well for me so far |
19:19:25 | FromDiscord | <Phil> But I did want to at least try a rolling release at one point before I fully settle on something... after having used ubuntu for 5 years now |
19:19:37 | FromDiscord | <slackaduts> yeah I use a debloated and mostly de-spyware'd windows 11 with startallback since the new start menu is complete pisswater |
19:20:08 | FromDiscord | <Arathanis> Using the VS Code Nim extension. Anyone know if there is a way to fix up `config.nims` and other NimScript files so they don't report incorrect errors w/ missing symbols? |
19:20:31 | FromDiscord | <slackaduts> I wish that extension did anything for me |
19:20:44 | FromDiscord | <Arathanis> In reply to @slackaduts "I wish that extension": agreed... it is lacking |
19:20:48 | FromDiscord | <Phil> I've never had any issues ith it so hard for me to say |
19:20:56 | FromDiscord | <Arathanis> but better than nothing, its got most of the basic |
19:20:57 | FromDiscord | <Arathanis> (edit) "basic" => "basics" |
19:20:58 | FromDiscord | <Phil> I'd like for the intellisense to work a bit more consistently but...eh |
19:21:09 | FromDiscord | <Arathanis> yeah the intellisense is a little off |
19:21:25 | FromDiscord | <Arathanis> it almost needs you to reference a symbol in a library first before it starts picking up the symbols in that library |
19:21:51 | FromDiscord | <Phil> The only time I get proper intellisense is right after typing the import statement |
19:21:57 | FromDiscord | <Phil> If I compile in between it's over |
19:22:09 | FromDiscord | <Arathanis> lol yeah its not great |
19:22:11 | FromDiscord | <Phil> After that, I only get name suggestions from stuff I typed previously |
19:22:40 | FromDiscord | <Arathanis> pretty much my experience as well |
19:22:45 | FromDiscord | <Arathanis> at least we got syntax highlighting, right? |
19:22:53 | FromDiscord | <Phil> Yeh, it's nice |
19:24:09 | FromDiscord | <Arathanis> well i found a workaround for `.nims` files |
19:24:16 | FromDiscord | <Arathanis> so that it stops complaining |
19:24:27 | FromDiscord | <Arathanis> its only a little hacky but i guess its better than red lines under everything |
19:28:04 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3OSE |
19:28:25 | FromDiscord | <Arathanis> this ext seems to be actively maintained, so maybe ill post a github issue for it see if we can't get it to mature with feedback over time |
19:46:55 | FromDiscord | <Gustavo6046> In reply to @slackaduts "foo ^= True IIRC": wat, that's a bitwise operator, not a logical one |
19:47:03 | FromDiscord | <Gustavo6046> it makes sense if you want bitfields, though |
19:52:07 | PMunch | @slackaduts, I'm a bot though |
19:52:41 | FromDiscord | <slackaduts> lmao |
19:52:57 | * | PMunch bleep bloop |
19:52:58 | FromDiscord | <Phil> See, some bots tell the truth |
19:53:01 | FromDiscord | <Phil> Like NimEventer |
19:53:05 | FromDiscord | <Phil> And some bots are dirty fucking liars |
19:58:23 | FromDiscord | <Phil> Uh, shiny, Ubuntu 20 comes with clang 10 |
19:58:57 | PMunch | Your use of shiny troubles me |
19:58:57 | FromDiscord | <Phil> Which now makes me only... like... 2 years and 3 versions behind |
19:59:24 | PMunch | That's patinated at best |
19:59:55 | FromDiscord | <Phil> Fuck I didn't expect this stomach muscle laughter workout this evening ๐ |
20:02:02 | FromDiscord | <Phil> In reply to @PMunch "Your use of shiny": OSholm Syndrome makes so many things shiny |
20:07:11 | FromDiscord | <Phil> Yeeeee either way, Clang 10 is not the solution |
20:08:02 | PMunch | OSholm? |
20:09:16 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OSR |
20:09:28 | FromDiscord | <Phil> So clang 12 or 13 likely are the target |
20:11:52 | FromDiscord | <Phil> In reply to @PMunch "OSholm?": By the fact I never left Debian for being unwilling to leave my Linux comfort zone while I was dealing with other things |
20:13:00 | PMunch | Aaah :P |
20:14:09 | PMunch | I'm curious, could you send me the JSON file within the cache directory? |
20:14:22 | PMunch | I wonder what is actually stored as unexposed |
20:15:17 | FromDiscord | <Phil> https://media.discordapp.net/attachments/371759389889003532/939977567342059640/opir_FB883BC581E5EE78.json |
20:16:47 | FromDiscord | <Phil> That was the json you wanted right?โต`.cache/nim/nimlibwebp_d/opir_lotsofnumbers.json`? |
20:17:47 | FromDiscord | <Phil> Here in case the opir.json from `.cache/nim/opir_r/opir.json` https://media.discordapp.net/attachments/371759389889003532/939978197133570058/opir.json |
20:17:53 | FromDiscord | <Phil> (edit) "Here in case the opir.json from `.cache/nim/opir_r/opir.json` ... https://media.discordapp.net/attachments/371759389889003532/939978197133570058/opir.json" added "was your goal" |
20:30:22 | PMunch | The first one was what I was looking for |
20:33:05 | PMunch | Hmm, not entirely sure why clang isn't able to read that one |
20:33:31 | PMunch | The line is `typedef int (*WebPWriterFunction)(const uint8_t* data, size_t data_size, const WebPPicture* picture);` |
20:35:23 | FromDiscord | <Phil> I'm on my way to Ubuntu 21.10 so I'll tell you afterwards if that helped or not |
20:41:54 | FromDiscord | <Elegantbeef> It seems iso is moving to futhark for wrapping webp? |
20:42:15 | FromDiscord | <Phil> Pretty much. Not that I got far so far mind you |
20:42:49 | FromDiscord | <Phil> I think atm it's getting wrapping with futhark to work in general |
20:43:14 | FromDiscord | <Phil> For weblibp anyway, given my clang was just so insanely out of date I'm jumping from 18.04 to 21.10 |
20:43:25 | FromDiscord | <Elegantbeef> It's a relatively simple API like i said ๐ |
20:43:46 | FromDiscord | <Phil> Generally yes |
20:43:53 | FromDiscord | <Phil> But I relatively quickly get open questions |
20:44:04 | FromDiscord | <Phil> Like "How do I translate uint8 to nim" |
20:44:10 | FromDiscord | <Elegantbeef> `uint8` |
20:44:24 | FromDiscord | <Phil> I need an emoji that blinks right now |
20:44:24 | FromDiscord | <Elegantbeef> webp uses fixed size types |
20:44:27 | FromDiscord | <Elegantbeef> You can use the Nim types in that case |
20:44:39 | FromDiscord | <Phil> What do you mean there's a uint |
20:44:49 | FromDiscord | <Elegantbeef> Nim has unsigned integers |
20:45:34 | FromDiscord | <Phil> I just... never tried. I though they were discouraged due to the easily unintended behaviour they can cause and thus everything is just int |
20:45:43 | FromDiscord | <Elegantbeef> Sure but this is cinterop |
20:45:45 | FromDiscord | <Phil> Thus didn't even know they were implemented |
20:45:47 | FromDiscord | <Elegantbeef> You need types that match |
20:46:09 | FromDiscord | <Phil> That makes sense I guess I just didn't think that far |
20:51:48 | FromDiscord | <that_dude> Is there a way I can easily suppress only these error messages? https://media.discordapp.net/attachments/371759389889003532/939986758995677264/unknown.png |
20:52:13 | FromDiscord | <Elegantbeef> Those arent error messages |
20:52:22 | FromDiscord | <Elegantbeef> you can do `--warning[HoleEnumConv]:off` |
20:52:47 | FromDiscord | <that_dude> True not errors, but kinda like warnings right |
20:52:49 | FromDiscord | <that_dude> Thanks! |
20:53:01 | FromDiscord | <that_dude> oh lol |
20:55:07 | FromDiscord | <Elegantbeef> You can also do it in code just for the import but i dont know how that works with generics |
20:55:46 | FromDiscord | <that_dude> How would I do that? |
20:56:08 | FromDiscord | <that_dude> Is it kinda like the way I put in experimental pragmas at the top? |
20:56:30 | FromDiscord | <Elegantbeef> `{.push warning[HoleEnumConv]: off.}` followed by a `{.pop.}` where you want it to end |
20:56:42 | FromDiscord | <that_dude> Thanks! |
21:04:25 | NimEventer | New thread by Ryback08: Strutils count function bug with non ascii table ?, see https://forum.nim-lang.org/t/8874 |
21:06:37 | FromDiscord | <Arathanis> rip importing nimscript and qualifying the procs doesn't actually work, i guess ill just deal with all the errors in `.nims` files for now |
21:08:38 | FromDiscord | <Elegantbeef> What? |
21:09:01 | FromDiscord | <Arathanis> im on VS Code using the nims extension for sytax highlighting and the like |
21:09:16 | FromDiscord | <Arathanis> `config.nims` files report missing symbol errors all over the place |
21:09:22 | FromDiscord | <Arathanis> even though they execute just fine |
21:09:37 | FromDiscord | <Arathanis> seems to be unaware of the automatic imports when `config.nims` get executed |
21:10:05 | FromDiscord | <Elegantbeef> Think there was a fix for that in devel |
21:10:16 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=3OT5 |
21:10:19 | FromDiscord | <Arathanis> for nimsuggest? |
21:10:29 | FromDiscord | <Arathanis> In reply to @Elegantbeef "Think there was a": for nimsuggest? |
21:10:50 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/pull/19444 |
21:11:20 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/issues/19440 issue is here |
21:13:23 | FromDiscord | <Arathanis> ok cool so a fix is coming |
21:16:28 | FromDiscord | <Phil> Huh |
21:16:34 | FromDiscord | <Phil> Ubuntu 21.10 comes with clang 13 |
21:19:33 | FromDiscord | <Arathanis> you can also almost always add dev / future ppa to ubunutu |
21:19:51 | FromDiscord | <Arathanis> its like 1 line, then you get lots of fully updated things |
21:21:03 | FromDiscord | <Phil> pmunch! Clang 13 was indeed the solution |
21:22:22 | FromDiscord | <Phil> Now to comprehend how on earth to use that API |
21:23:33 | FromDiscord | <Elegantbeef> Well you still need to get to link it ๐ |
21:24:45 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OT9 |
21:25:39 | FromDiscord | <Elegantbeef> But it doesnt link the library does it? |
21:26:28 | FromDiscord | <Phil> I have no comprehension of anything, so the answer to that lies with pmunch and you |
21:26:36 | FromDiscord | <Phil> My thought level so far is: |
21:27:02 | FromDiscord | <Elegantbeef> Well the header doesnt have the implementation so you need to do `{.link: "libweb.a".}` for \nix afaik |
21:27:03 | FromDiscord | <Phil> C --> C-like nim through futhark --> procs from me that call the C-like nim procs |
21:27:28 | FromDiscord | <Phil> Ah, that |
21:27:50 | FromDiscord | <Phil> I pass `--passL:'-lwebp'` , I was under the impression that gives the compiler the lib for dynamic linking |
21:28:05 | FromDiscord | <Elegantbeef> That'd be for static linking |
21:28:12 | FromDiscord | <Elegantbeef> Afaict this library is shipped only statically |
21:29:06 | FromDiscord | <Phil> sh....orts |
21:30:33 | FromDiscord | <xx_ns> what |
21:30:44 | FromDiscord | <xx_ns> what is the purpose of a library you can't link against |
21:31:16 | FromDiscord | <Elegantbeef> What? |
21:32:42 | FromDiscord | <xx_ns> I dunno, I literally just jumped in here |
21:32:59 | * | Onionhammer quit (Quit: The Lounge - https://thelounge.chat) |
21:33:08 | FromDiscord | <Elegantbeef> We're talking about linking webp, it's shipped as a static library due to googles supreme intellect ๐ |
21:33:10 | FromDiscord | <Elegantbeef> So they need to link it before using it |
21:35:03 | FromDiscord | <xx_ns> I always thought a static library is.. well, code, which is included in your project. You can still compile the library, export symbols and link against that |
21:35:23 | FromDiscord | <Elegantbeef> Well it's a library that needs to be linked statically |
21:35:36 | FromDiscord | <Elegantbeef> It has it's own format, and works similar to a dynamic library |
21:35:44 | FromDiscord | <Elegantbeef> The difference is it's inside your final binary |
21:37:07 | * | jjido quit (Quit: Textual IRC Client: www.textualapp.com) |
21:37:10 | FromDiscord | <noow> In reply to @Elegantbeef "We're talking about linking": if a webp vuln drops, all programs will be like recompiling aggressively |
21:37:46 | FromDiscord | <xx_ns> I'm not sure I follow. Static libraries (.a) can still be linked against |
21:37:57 | FromDiscord | <Elegantbeef> No one said they couldnt? |
21:38:02 | FromDiscord | <xx_ns> oh |
21:38:12 | * | jmdaemon joined #nim |
21:38:22 | FromDiscord | <xx_ns> misinterpreted then, sorry |
21:38:22 | FromDiscord | <Elegantbeef> Both libraries need to be linked, it's in the name afterall |
21:38:36 | * | Onionhammer joined #nim |
21:39:06 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OTe |
21:39:26 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3OTe" => "https://play.nim-lang.org/#ix=3OTf" |
21:39:27 | FromDiscord | <Elegantbeef> Anway you should be able to do `{.link: "libwebp.a".}` |
21:40:25 | FromDiscord | <Elegantbeef> Assuming the libwebp.a is next to your file i think |
21:40:41 | FromDiscord | <Phil> Was about to say whether it infers the files location or I have to give the path |
21:40:54 | FromDiscord | <Phil> .... Yeah it needs the path |
21:41:23 | FromDiscord | <Elegantbeef> Well there is no path for storing static libraries on linux |
21:41:31 | FromDiscord | <Elegantbeef> Dont know the best way to handle this anyway |
21:41:37 | FromDiscord | <Elegantbeef> I dont know if pmunch is still about |
21:41:39 | FromDiscord | <Elegantbeef> He probably knows |
21:42:28 | FromDiscord | <Phil> Oh wait, there is a dynamic version that you can install from the repo, libwebp-dev... that is just version 0.6 vs 1.2.2 |
21:43:15 | FromDiscord | <Phil> 0.6.1-2.1, whatever that means |
21:44:34 | FromDiscord | <Waldecir Santos> can someone point me to a example for the use of `closure` pragma ? |
21:45:19 | FromDiscord | <Waldecir Santos> (edit) "a" => "an" |
21:45:36 | FromDiscord | <Elegantbeef> generally ime you dont use closure manually |
21:46:25 | FromDiscord | <Waldecir Santos> Sure, but I just want to understand how it works, and what are the usages for it |
21:46:30 | FromDiscord | <Elegantbeef> I guess except for iterators |
21:47:20 | FromDiscord | <noow> closures are functions with references to local variables outside the function body |
21:48:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OTj |
21:48:29 | FromDiscord | <Elegantbeef> Here is an example of what a closure iterator can do |
21:48:43 | FromDiscord | <Elegantbeef> They're first class iterators which means they can be stored |
21:48:53 | FromDiscord | <Elegantbeef> They also hold state which means you can use them like functions |
21:50:06 | FromDiscord | <noow> /unrelated is it possible to read the state of an iterator, like whether it's finished/dead or still has yields to do |
21:50:12 | FromDiscord | <Waldecir Santos> Sure but where `{.closure.}` pragma fits in it ? |
21:50:16 | FromDiscord | <Elegantbeef> functions that remember what's going on \ |
21:50:32 | FromDiscord | <Elegantbeef> `iterator: int` is implicitly `iterator: int {.closure.}` |
21:50:49 | FromDiscord | <Elegantbeef> closure is implicitly applied to proc definitions and iterators |
21:51:14 | FromDiscord | <Waldecir Santos> Ohh I see, got it |
21:52:02 | FromDiscord | <Elegantbeef> https://github.com/beef331/goodwm/blob/58c67eca84a86aa9ded6c1d5362129b737ddde9a/src/goodwm/layouts.nim an example of why you might want to use closure iterators is something like this |
21:52:19 | FromDiscord | <Elegantbeef> It allows you to instantiate them with data then just work with that data as you go |
21:52:58 | FromDiscord | <Elegantbeef> Though i now have a `asClosure` macro i'd just use here to reduce the proc factory |
21:53:42 | FromDiscord | <Waldecir Santos> perfect, thank you |
21:54:45 | FromDiscord | <Elegantbeef> https://github.com/beef331/slicerator/blob/master/tests/test1.nim#L73-L159 for more examples of what closures let you do |
21:55:22 | FromDiscord | <Elegantbeef> Ah i guess i have the unrelated "Range iters" test there ;D |
22:02:25 | FromDiscord | <Phil> If something in C blobbers about "returns the size of the compressed data" are they just talking about "this is a count of bytes" or "this is all the output bytes" ? |
22:03:38 | FromDiscord | <Phil> Is the documentation within the header file seriously all the API documentation you get for the individual procs? |
22:03:46 | FromDiscord | <Elegantbeef> the amount of bytes in the output data |
22:04:11 | FromDiscord | <Elegantbeef> Yes it is |
22:04:11 | FromDiscord | <Elegantbeef> What proc are you using? |
22:06:20 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OTn |
22:07:13 | FromDiscord | <Elegantbeef> stride is the distance between pixel data |
22:07:21 | FromDiscord | <Elegantbeef> if it's tightly packed data it'll be 0 |
22:07:23 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3OTn" => "https://play.nim-lang.org/#ix=3OTo" |
22:07:38 | FromDiscord | <Elegantbeef> the `output` is a pointer to a int byte array the program will write to |
22:07:48 | FromDiscord | <Elegantbeef> This is a common way of C to operate |
22:08:58 | FromDiscord | <Elegantbeef> The reason stride exists is incase your pixel data is non contiguous so you can easily interact with this api |
22:09:12 | FromDiscord | <Elegantbeef> Aslong as your rgb data is next to it and next elements are the same distance apart |
22:10:14 | FromDiscord | <Phil> So for any person like me before I went down this rabbit hole I'll definitely want to use WebPEncodeRGB and whatever the proc is called that converts... I dunno, JPEG bytes from whatever they have into RGB together just so I can have a simple API proc of "convertJpegToWebP" |
22:12:37 | NimEventer | New thread by Mrgaturus: NPainter: progress report 2020 & 2021, see https://forum.nim-lang.org/t/8875 |
22:14:00 | FromDiscord | <Elegantbeef> Ew using procedure name to dictate flow ๐ |
22:14:04 | FromDiscord | <Elegantbeef> But yea |
22:15:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OTr |
22:17:13 | FromDiscord | <Phil> data is ptr seq[uint8]? |
22:17:30 | FromDiscord | <Elegantbeef> data is a `ptr uint8` |
22:17:46 | FromDiscord | <Elegantbeef> it's the address to the first element in your array |
22:17:51 | FromDiscord | <Phil> I may be interpreting this wrong |
22:17:52 | FromDiscord | <Phil> Ohhhh |
22:17:56 | FromDiscord | <Phil> That was what was confusing me |
22:18:07 | FromDiscord | <Phil> because the type is an array so why do I have a single uint8 there |
22:18:16 | FromDiscord | <noow> you can also cast it to ptr UncheckedArray[uint8] |
22:18:32 | FromDiscord | <Elegantbeef> Eh no point casting it here |
22:18:57 | FromDiscord | <noow> probably |
22:19:20 | FromDiscord | <Elegantbeef> A lot of C array passing is just pointer to the first element |
22:19:24 | FromDiscord | <Phil> why make the output width x height x 3? for rgb? |
22:19:38 | FromDiscord | <Elegantbeef> We know at max it'll be that size |
22:19:53 | FromDiscord | <noow> no alpha? ๐ |
22:19:56 | FromDiscord | <Elegantbeef> There is some compression with webp but at max it will be the size of the image times 3 due to 0 compression |
22:20:25 | FromDiscord | <Phil> times 3 because full uint8 for individual values of r, g and b I assume |
22:20:36 | FromDiscord | <Phil> (edit) "times 3 because full uint8 for individual values of r, g and b ... I" added "for every pixel" |
22:20:39 | FromDiscord | <Elegantbeef> yes |
22:20:50 | FromDiscord | <Elegantbeef> That's just an assumption though |
22:20:54 | FromDiscord | <Elegantbeef> I should read the comment |
22:22:23 | FromDiscord | <Elegantbeef> Oh wait i'm wrong |
22:22:27 | FromDiscord | <Elegantbeef> You dont need the sequence |
22:22:35 | FromDiscord | <Elegantbeef> It allocates the data for you |
22:23:00 | FromDiscord | <Elegantbeef> So then after encoding you need to call `WebPFree(output)` |
22:23:44 | FromDiscord | <Phil> Don't I have to store the output somewhere first? |
22:24:03 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OTs |
22:24:06 | FromDiscord | <Elegantbeef> Then you can do whatever you want with that |
22:24:27 | FromDiscord | <Elegantbeef> Welcome to C where a `ptr ptr uint8` is actually a `ptr uint8[]` |
22:24:42 | FromDiscord | <Elegantbeef> Cause "fuck type safety" |
22:27:51 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OTw |
22:28:15 | FromDiscord | <Elegantbeef> Welcome to a type safe language |
22:28:35 | FromDiscord | <Elegantbeef> do `cast[ptr ptr uint8](output)` |
22:29:17 | FromDiscord | <Phil> How do I just... get the pointer from the data? I'd like for users of nim to not have to ever even see the ptr show up in the proc signature, so I'd like for them to hand me data and then I just specifically pass on the pointer to it |
22:29:38 | FromDiscord | <Elegantbeef> This is where wrapping the stuff idiomatically happens |
22:29:56 | FromDiscord | <Elegantbeef> you expose one that takes an `openArray[uint8]` then do `myOA[0].addr` |
22:30:22 | FromDiscord | <Elegantbeef> You will either have to return a pointer or copy it to a sequence for the return value |
22:30:33 | FromDiscord | <Phil> Ohhhh .addr is the proc that returns the pointer |
22:30:44 | FromDiscord | <Elegantbeef> Yes it's address |
22:30:53 | FromDiscord | <Elegantbeef> Much more clear than `&` methinks ๐ |
22:31:16 | FromDiscord | <Phil> I fully agree |
22:34:17 | FromDiscord | <Phil> This is the kind of stuff that makes me believe you need to know C first to wrap C |
22:34:32 | FromDiscord | <Phil> I can't thank you enough for the explanations |
22:35:04 | FromDiscord | <Phil> That's more gotchas in the last hour than I've seen in JS since I started coding in it... and I'm not particularly a fan of JS |
22:35:34 | FromDiscord | <Elegantbeef> I dont know C |
22:35:48 | FromDiscord | <Phil> squints |
22:36:16 | FromDiscord | <Elegantbeef> I mean it's semantics of a manual allocated language ๐ |
22:37:36 | FromDiscord | <Phil> to copy from UncheckedArray to a seq[uint8] |
22:37:48 | FromDiscord | <Phil> Do I just loop over the uncheckedArray or do we have some sort of copy operator ? |
22:38:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3OTx |
22:42:40 | FromDiscord | <Phil> It is officially impossible for C to become obsolete fast enough |
22:42:52 | FromDiscord | <Elegantbeef> Zig and Odin are trying |
22:43:04 | FromDiscord | <Phil> They have to try harder if this is what sane people need to deal with |
22:43:18 | FromDiscord | <Elegantbeef> I mean C is the interop language |
22:43:31 | FromDiscord | <Elegantbeef> So this will happen even if no one used C directly |
22:46:43 | NimEventer | New thread by Aquachain: Get unicode codes of a string, see https://forum.nim-lang.org/t/8876 |
22:53:48 | FromDiscord | <Phil> oh.... oh god... this isn't even the only lib I'll need. I need to also get stuff that converts from jpeg to rgb as that's not in the lib |
22:53:50 | FromDiscord | <Phil> Welp |
22:55:53 | FromDiscord | <Phil> Yeah I'm not delaing with that today. I'll keep what you said in mind. I'm writing myself notes of what I've learned so far and then head to bed |
22:56:00 | FromDiscord | <Phil> (edit) "delaing" => "dealing" |
22:58:36 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3OTC |
22:58:53 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3OTC" => "https://play.nim-lang.org/#ix=3OTD" |
22:59:31 | FromDiscord | <Elegantbeef> The fuck are you on about? ๐ |
22:59:48 | FromDiscord | <Elegantbeef> the sequence is allocated to it's `len` |
23:00:05 | FromDiscord | <Elegantbeef> so we know for certain that `size` will fit inside the sequence |
23:00:16 | FromDiscord | <Phil> Ohhhhhhhhh right |
23:00:19 | PMunch | You're still having fun I see @Phil :P |
23:00:34 | FromDiscord | <Phil> In reply to @PMunch "You're still having fun": I have no idea how C dev survive |
23:00:40 | FromDiscord | <Phil> (edit) "dev" => "devs" |
23:00:56 | PMunch | It's not that bad once you get used to |
23:01:11 | FromDiscord | <Elegantbeef> Is stockholm nice this time of year? |
23:01:48 | PMunch | Once you get your head inside the machine, understand how everything works, then you sorta start to think about what the other languages are doing under the hood. |
23:01:51 | PMunch | Haha :P |
23:01:52 | FromDiscord | <Phil> So far every second word in C has been a gotcha |
23:02:11 | PMunch | It's a dense language, but if you think C is bad don't try Forth :P |
23:02:32 | PMunch | Someone crashed a spaceship because they mistook a , for a . in Forth |
23:02:39 | PMunch | Couple million dollars right out the window |
23:03:14 | FromDiscord | <Elegantbeef> Well C is a "simple" language |
23:03:23 | FromDiscord | <Elegantbeef> The simple means it doesnt have many mechanisms ๐ |
23:03:52 | FromDiscord | <Elegantbeef> If only pascal won |
23:03:55 | FromDiscord | <Phil> Nim is my fourth language and with it I've got my bases covered. Nim for fun and performance, python for fun and ecosystem, Java to make money and JS/TS for web |
23:05:14 | PMunch | If only I could make money with Nim.. |
23:05:39 | FromDiscord | <Elegantbeef> Dont you use Nim at your job you jester |
23:06:34 | FromDiscord | <Elegantbeef> Oh and pmunch this is my level editor now https://streamable.com/z3ny3a it's 100% more sensible now |
23:07:09 | PMunch | Well yes, but only when I manage to sneak it past management :P |
23:07:57 | PMunch | Wait, this is a new game? |
23:08:07 | PMunch | Looks really solid! |
23:08:19 | FromDiscord | <Elegantbeef> "New game" |
23:08:30 | FromDiscord | <Elegantbeef> It's a 2D project that i made forever ago |
23:08:52 | FromDiscord | <Elegantbeef> Ported it to 3D in november, then got back to it again recently |
23:09:22 | PMunch | Before the one you wrote in Nico which I can never remember the name of? |
23:09:31 | PMunch | But which I played waaay too much |
23:09:37 | FromDiscord | <Elegantbeef> Linerino |
23:09:42 | PMunch | That's the one! |
23:10:42 | FromDiscord | <Elegantbeef> Nah i made it after linerino but stopped working on it for whatever reason |
23:10:49 | FromDiscord | <Phil> Alright, heading to bed, have a good time you guys and thank you both very much for the support! |
23:11:16 | FromDiscord | <Elegantbeef> https://streamable.com/pj725f was the 2D version |
23:11:25 | FromDiscord | <Elegantbeef> No problem |
23:12:09 | FromDiscord | <Elegantbeef> Buh bye |
23:17:48 | PMunch | Oh yeah, I remember you sharing some screenshots of that |
23:18:02 | PMunch | The 3D version looks super tight though |
23:18:26 | PMunch | Sorry for the slow response, got stuck playing Linerino on the hardest difficulty (again) |
23:18:31 | PMunch | But I'm off to bed as well |
23:18:35 | * | PMunch quit (Quit: leaving) |
23:18:39 | FromDiscord | <Elegantbeef> Buh bye |
23:21:38 | * | jmdaemon quit (Ping timeout: 250 seconds) |
23:45:19 | FromDiscord | <noow> why does strtok modify its argument |
23:45:22 | FromDiscord | <noow> C ๐ญ |
23:48:03 | FromDiscord | <noow> it's okay it's okay <string.h> is a what string manipulation libraries should look like |
23:59:08 | FromDiscord | <Yepoleb> C is cursed stuff |