00:00:04 | * | Batzy quit (*.net *.split) |
00:00:04 | * | Arthur quit (*.net *.split) |
00:00:04 | * | cm quit (*.net *.split) |
00:00:04 | * | acidsys quit (*.net *.split) |
00:00:04 | * | tk quit (*.net *.split) |
00:00:35 | FromDiscord | <sOkam! đ«> sent a code paste, see https://play.nim-lang.org/#ix=4Gpi |
00:00:55 | * | Batzy joined #nim |
00:01:04 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4Gpk |
00:01:15 | FromDiscord | <kingterrytheterrible12> in my case it doesnt matter really |
00:01:21 | FromDiscord | <kingterrytheterrible12> i just use it once then discard it |
00:02:17 | * | cm joined #nim |
00:04:28 | * | tk joined #nim |
00:05:22 | * | acidsys joined #nim |
00:13:05 | FromDiscord | <fenilli> So based on a question I had here: https://discord.com/channels/371759389889003530/753721959308853319/1152029565615616051 I would like to ask what is the pre/post proccess of writing an application that uses a c library?â”meaning, before writting the code, does I have to install sdks for it? add to path? or would it be better to git clone and use the C files? and post how do I link the files/headers if its needed to the compiler/linker? |
00:13:37 | FromDiscord | <kingterrytheterrible12> In reply to @fenilli "So based on a": its a bit complicated |
00:14:11 | FromDiscord | <kingterrytheterrible12> but it depends on what you doing ngl |
00:16:19 | FromDiscord | <demotomohiro> @fenilli Using C library from Nim is almost same to using C library from C. |
00:17:25 | FromDiscord | <fenilli> that is the problem, not a c developer but a js developer, so I'm accustomed to just install it and it runs, no need for compiling nor linking. |
00:18:06 | FromDiscord | <fenilli> so I have no clue on how to compile/link things in C, even so to wrap a library with it. |
00:18:39 | FromDiscord | <kingterrytheterrible12> In reply to @fenilli "that is the problem,": xd welcome to building C |
00:19:14 | FromDiscord | <kingterrytheterrible12> i literally stopped using C++ because configuring libs would take an awful long time and also messing with linker and other shit |
00:19:22 | FromDiscord | <demotomohiro> In reply to @fenilli "so I have no": These articles might help you:â”https://internet-of-tomohiro.netlify.app/nim/gccguide.enâ”https://internet-of-tomohiro.netlify.app/nim/clibrary.en |
00:23:45 | FromDiscord | <fenilli> In reply to @demotomohiro "These articles might help": Awesome, I will read it to see if it helps me understand better on how to actually use C itself. |
00:26:46 | FromDiscord | <demotomohiro> In reply to @fenilli "Awesome, I will read": More document: https://nim-lang.org/docs/backends.html |
00:28:58 | FromDiscord | <fenilli> is this a typo or intended? `compileToC, cc` but it is `nim c hallo.nim` |
00:32:03 | FromDiscord | <demotomohiro> In reply to @fenilli "is this a typo": They are nim command compile to c: https://nim-lang.org/docs/nimc.html |
00:32:37 | FromDiscord | <demotomohiro> People just run `nim c hello.nim` |
00:33:47 | FromDiscord | <fenilli> yeh yeh, I meant that all others match, cpp to nim cpp, objs to nim objc but the cc goes to nim c in the docs. |
00:33:56 | FromDiscord | <fenilli> (edit) "objs" => "objc" |
00:35:55 | FromDiscord | <raynei486> I guess `cc` can be short for "c compiler" |
00:36:29 | FromDiscord | <fenilli> yeh but wouldn't that make cpp to ccpp and objc to cobjc instead to? |
00:36:51 | FromDiscord | <fenilli> not really a big deal, just found it odd that its the only different one. |
00:41:51 | FromDiscord | <kingterrytheterrible12> https://play.nim-lang.org/â”neat, never knew i can do this with version numbers in nim. its gonna help a whole lot with updating my app |
00:58:28 | FromDiscord | <raynei486> you didn't send anything in your link đ |
01:01:15 | FromDiscord | <kingterrytheterrible12> In reply to @raynei486 "you didn't send anything": oh shit |
01:02:07 | FromDiscord | <kingterrytheterrible12> i fix |
01:03:13 | FromDiscord | <raynei486> oh I didn't even know string comparison could be like that |
01:03:22 | FromDiscord | <raynei486> lexicographical comparison powers? |
01:03:26 | FromDiscord | <kingterrytheterrible12> In reply to @raynei486 "oh I didn't even": yeah it helps a lot with version numbers |
01:03:35 | FromDiscord | <kingterrytheterrible12> In reply to @raynei486 "lexicographical comparison powers?": idk what that it but sounds like fax |
01:03:46 | FromDiscord | <kingterrytheterrible12> (edit) "it" => "is" |
01:13:16 | * | syl quit (Server closed connection) |
01:16:32 | * | syl joined #nim |
01:21:51 | * | lucasta_ quit (Quit: Quit) |
01:41:26 | FromDiscord | <kots> "11.1.1" > "3.2.1" = false, which might not be what you want |
01:47:25 | FromDiscord | <fenilli> I guess it would be more of a problem for minor and patch versions, as major 10 is really a lot already. |
01:50:59 | * | xmachina quit (Quit: WeeChat 4.0.4) |
01:52:59 | * | xmachina joined #nim |
01:53:44 | * | cm quit (Ping timeout: 246 seconds) |
02:09:09 | * | cm joined #nim |
02:13:58 | FromDiscord | <kingterrytheterrible12> In reply to @k0ts ""11.1.1" > "3.2.1" =": Oh shit |
02:14:10 | FromDiscord | <fenilli> In reply to @demotomohiro "These articles might help": Those pages where great! I think it was the best explanation ever for how C works with linking and how to use Nim in that. |
02:14:22 | FromDiscord | <fenilli> thanks for that page, helped a lot. |
02:17:59 | * | cm quit (Ping timeout: 245 seconds) |
02:18:26 | * | cm joined #nim |
02:51:57 | * | azimut quit (Ping timeout: 246 seconds) |
03:15:49 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4GpK |
03:15:56 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=4GpK" => "https://play.nim-lang.org/#ix=4GpL" |
04:14:39 | * | koltrast quit (Server closed connection) |
04:18:30 | * | koltrast joined #nim |
04:39:13 | * | blop_ quit (Remote host closed the connection) |
04:39:44 | * | blop_ joined #nim |
04:40:20 | * | Guest49 joined #nim |
04:40:47 | * | Guest49 quit (Client Quit) |
04:54:16 | FromDiscord | <pmunch> In reply to @Elegantbeef "install libclang": Have people stopped reading error messages? I mean sure, nobody ever reads a README, but now we won't even read the error message? |
04:56:28 | FromDiscord | <Elegantbeef> Reading is hard |
05:04:55 | NimEventer | New Nimble package! zuhyo - The easiest way to interact with a graphql api, see https://github.com/arashi-software/zuhyo |
05:27:39 | * | attah quit (Server closed connection) |
05:28:30 | * | attah joined #nim |
05:30:05 | * | advesperacit joined #nim |
05:39:39 | * | cornfeedhobo quit (Server closed connection) |
05:43:39 | * | adium quit (Server closed connection) |
05:45:47 | * | adium joined #nim |
05:49:06 | FromDiscord | <nasuray> In reply to @k0ts ""11.1.1" > "3.2.1" =": For applications I've started using a version scheme of `YYYY.BUILD` where build is an incrementing number starting at `1001` that maintains lexicographical order meaning that for example after `1999` would be `22000` so this type of comparison would always be valid. Not that this is a the best way to attempt to compare version identifiers. But useful in other situations where you might get a l |
05:51:26 | * | cornfeedhobo joined #nim |
06:11:39 | * | PMunch joined #nim |
06:40:52 | * | NimBot quit (Server closed connection) |
06:41:04 | * | NimBot joined #nim |
07:00:33 | * | xet7 quit (Remote host closed the connection) |
07:02:35 | * | ntat joined #nim |
07:08:19 | * | xet7 joined #nim |
07:16:08 | * | cnx quit (Remote host closed the connection) |
07:16:58 | * | cnx joined #nim |
08:22:23 | * | ntat quit (Quit: leaving) |
09:42:45 | * | krux02 joined #nim |
10:12:55 | om3ga | conversion to enum with holes is unsafe <-- why?? :) |
10:14:04 | om3ga | https://github.com/PMunch/nim-pcap/blob/36886f0162bba99efd0c57ca771275d561957cc2/pcap.nim#L261 |
10:15:50 | Amun-Ra | by design |
10:15:55 | om3ga | I googled, found a lot talks about warning, just cant get into it. Can this warning lead to bug or why compiler warns about this? |
10:16:53 | Amun-Ra | it'll lead to an error iirc |
10:17:32 | * | blop_ quit (Remote host closed the connection) |
10:17:52 | om3ga | Amun-Ra: sad news |
10:17:59 | * | blop_ joined #nim |
10:18:37 | om3ga | and, how to deal with it? is there any alternatives? what I found not eliminates the warning |
10:19:15 | om3ga | even enumutils .items iterator triggers warning |
10:19:28 | Amun-Ra | one solution is to use case for conversion |
10:20:24 | om3ga | thanks, I will try this now |
10:20:33 | Amun-Ra | it doesn't end with an error, https://play.nim-lang.org/#ix=4GqL |
10:21:23 | om3ga | awesome thanks |
10:24:55 | om3ga | well.. maybe with this code it will not work? still reports warning |
10:25:11 | Amun-Ra | yes, you'll always end with a warning |
10:25:31 | Amun-Ra | the compiler can't be sure the conversion is safe (except pehaps compile time conversion) |
10:25:39 | PMunch | om3ga, it has a warning because it's not a great situation to be in |
10:25:40 | Amun-Ra | perhaps* |
10:25:59 | om3ga | aah, so I should not pay attention |
10:26:10 | om3ga | like false positive issue |
10:26:11 | Amun-Ra | use case for all the possible values and you'll be fine |
10:26:18 | PMunch | For the PCAP library it shouldn't be an issue |
10:26:28 | Amun-Ra | or disable the hint ;> |
10:26:29 | PMunch | All the values that should be present in this field is covered by the enum |
10:26:55 | PMunch | The problem is if you get a number like 175, which doesn't correspond to a LinkLayerType |
10:27:08 | om3ga | yes, that's why this warning confuses |
10:27:28 | PMunch | But as long as you have a valid PCAP file then you should never encounter any issues with it |
10:27:50 | om3ga | even if I do: for n in LinkLayerType.low..LinkLayerType.high: ... |
10:29:25 | om3ga | PMunch, Amun-Ra thanks for explanation |
10:29:32 | om3ga | I will leave original code |
10:30:32 | PMunch | om3ga, if you do `for n in LinkLayerType.low..LinkLayerType.high:` it will produce invalid enum values, because there are numbers in that range which don't correspond to a value |
10:32:36 | om3ga | I tried all examples that found, all of them trigger warning |
10:33:13 | om3ga | better to leave original code, if the warning will not dissapear anyway |
10:33:20 | PMunch | Yes, they will all trigger a warning |
10:33:27 | PMunch | But they don't trigger an error |
10:33:38 | PMunch | They only trigger a warning during compilation right? |
10:33:41 | om3ga | yes, everything works well |
10:34:01 | om3ga | PMunch: yes, it's compiler warning |
10:34:13 | PMunch | Yeah, you won't get rid of that |
10:34:38 | om3ga | very confusing :) |
10:34:53 | PMunch | Well, you could. By padding the enum with something like InvalidLinkLayer1, InvalidLinkLayer2, etc. |
10:35:02 | PMunch | But there's no benefit |
10:35:26 | PMunch | I guess you could also push a pragma to ignore the warning |
10:37:49 | FromDiscord | <_gumbercules> hmmm... I'm trying to invoke `llvm-ar` via emscripten's `emar.bat` but the list of bytecode files I'm asking it to archive is apparently exceeding the max size of the allowed command |
10:38:19 | FromDiscord | <_gumbercules> wonder if I can send it in a wildcard |
10:51:18 | FromDiscord | <_gumbercules> have a feeling this has something to do with windows and batch files |
10:55:47 | FromDiscord | <_gumbercules> okay - not ideal but storing the input file names in a text file and passing `@filename.txt` to `emar.bat` which invokes `llvm-ar` worked |
10:58:08 | * | azimut joined #nim |
11:06:14 | om3ga | PMunch: I believe users will not notice this, in any case if someone will feed strange pcap file, I will respond that such file is not supported haha |
11:16:37 | * | krux02 quit (Remote host closed the connection) |
11:16:56 | * | krux02 joined #nim |
11:32:35 | * | Mister_Magister joined #nim |
11:48:39 | * | Mister_Magister quit (Read error: Connection reset by peer) |
11:51:36 | * | Mister_Magister joined #nim |
12:27:36 | FromDiscord | <Chronos [She/Her]> If only I had the energy to actually work on my programming language |
12:37:03 | FromDiscord | <toma400> Funnily, before I get to know Nim, I was working on my own programming language...â”Then I found out Nim exists and fulfills literally everything my language wanted to be, and yet it is even better in several aspects (metaprogramming).â”â”Won't say that my plans for language are now gone, but I definitely feel like it's no longer that needed. |
12:37:37 | FromDiscord | <toma400> (edit) "(metaprogramming).â”â”Won't" => "(metaprogramming, cleaner approach of syntax, etc.).â”â”Won't" |
12:37:59 | FromDiscord | <toma400> (edit) "needed." => "urgent." |
12:38:38 | FromDiscord | <toma400> (edit) "get" => "got" |
12:39:31 | * | cm_ joined #nim |
12:39:48 | * | cm quit (Ping timeout: 240 seconds) |
12:39:48 | * | cm_ is now known as cm |
12:47:26 | * | rockcavera quit (Remote host closed the connection) |
12:51:53 | FromDiscord | <Chronos [She/Her]> That's fair |
12:52:08 | FromDiscord | <Chronos [She/Her]> I'm still wanting a JVM language tbh that's closer to Nim |
12:54:18 | * | rockcavera joined #nim |
12:57:05 | FromDiscord | <ShalokShalom (ShalokShalom)> Still pointing to Sulong \:D |
12:57:05 | FromDiscord | <ShalokShalom (ShalokShalom)> Still poiting to Sulong \:D |
12:57:39 | FromDiscord | <ShalokShalom (ShalokShalom)> It originally did mean C Compiler and got later renamedâ”(@raynei486) |
12:57:48 | FromDiscord | <ShalokShalom (ShalokShalom)> As more compiler got added. |
12:59:11 | FromDiscord | <toma400> In reply to @chronos.vitaqua "I'm still wanting a": Oh yeah, this would be neat. Kotlin is super cool, but it also has its own quirks |
12:59:45 | FromDiscord | <Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Still poiting to Sulong": Doesn't have JVM interop, is GraalVM specific |
12:59:50 | FromDiscord | <Chronos [She/Her]> In reply to @toma400 "Oh yeah, this would": For sure! |
13:01:12 | FromDiscord | <ShalokShalom (ShalokShalom)> Every Truffle language has interop with JVMâ”(@Chronos [She/Her]) |
13:01:40 | FromDiscord | <odexine> @treeform i apologise if you do not want to be pinged. I would like to ask about pixie and the colour it decodes into; is ColorRGBX assumed to be sRGB gamma-encoded or linear? |
13:03:24 | FromDiscord | <ShalokShalom (ShalokShalom)> And most of all, Java itself is implemented as Truffle language |
13:03:44 | FromDiscord | <ShalokShalom (ShalokShalom)> https://www.graalvm.org/latest/reference-manual/java-on-truffle/interoperability/ |
13:04:16 | FromDiscord | <Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Every Truffle language has": Hm, still has the issue of being Graal specific |
13:04:26 | FromDiscord | <Chronos [She/Her]> Though the interop part is nicer |
13:05:52 | FromDiscord | <odexine> In reply to @odexine "<@107140179025735680> i apologise if": please ping me along with the answer when (if?) you answer this, thank you |
13:09:41 | FromDiscord | <jviega> I mean, the JVM isn't particularly relevant anymore. It's still too heavyweight for really low end hardware, and in the server/desktop world it was built for, there are only two platforms. In 1995 when it came out, there were dozens. The Java ecosystem sure, I guess that could be a good reason to want a language targeted to the VM, but it feels crufty and legacy |
13:11:06 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "I mean, the JVM": Minecraft modding is the biggest reason I want it |
13:11:07 | FromDiscord | <Chronos [She/Her]> And pretty much the only reason |
13:11:15 | FromDiscord | <Chronos [She/Her]> That's literally it lol |
13:12:00 | FromDiscord | <Chronos [She/Her]> Also aren't desktop devices seeing more variation again? |
13:12:24 | FromDiscord | <Chronos [She/Her]> Risc-V is on the rise, x64 is still obviously a major player, Mac is using arm now for Macs |
13:13:19 | FromDiscord | <toma400> In reply to @chronos.vitaqua "Minecraft modding is the": Gosh, yeah, there are already Kotlin and Groovy adopters for Forge, imagine Nim-like one. This would be huge |
13:13:22 | FromDiscord | <Chronos [She/Her]> But WASM is likely better for that anyway once WASI has a good API for interop with the host system |
13:13:32 | FromDiscord | <Chronos [She/Her]> In reply to @toma400 "Gosh, yeah, there are": It'd be hella cool tbh |
13:13:37 | FromDiscord | <toma400> Also funny to speedrun knowing you in one day, fellow Minecraft modding enthusiast đ
|
13:13:46 | FromDiscord | <toma400> (edit) "Also funny to speedrun knowing you in one day, fellow Minecraft modding enthusiast ... đ
" added "here" |
13:14:10 | FromDiscord | <Chronos [She/Her]> I'd port Nim to the JVM but... I tried that a while ago and gave up because it was just too much for me rip, may give it ago again but hm |
13:14:31 | FromDiscord | <Chronos [She/Her]> In reply to @toma400 "Also funny to speedrun": Haha yeah, I'm not active in the modding scene tbh but I would be if the JVM languages that currently existed suited me |
13:15:23 | FromDiscord | <Chronos [She/Her]> In reply to @chronos.vitaqua "I'd port Nim to": Tho tbh I did try that when I was much more inexperienced so... and I tried making it output to an assembler language instead of a subset of Java so hm |
13:15:56 | FromDiscord | <odexine> In reply to @odexine "<@107140179025735680> i apologise if": https://github.com/treeform/pixie/issues/545 I've opened an issue about this, sorry if it's irrelevant |
13:16:08 | FromDiscord | <toma400> In reply to @chronos.vitaqua "Haha yeah, I'm not": Honestly, Minecraft modding even with current ecosystem is super fun, given how much potential for extensions Mc gameplay has. Either way, wishing you good luck with it, or staying wherever you are feeling comfy right now. |
13:16:21 | FromDiscord | <Chronos [She/Her]> Thanks haha |
13:16:38 | FromDiscord | <Chronos [She/Her]> Honestly all I need to do is make a parser for my language then I could do codegen |
13:16:46 | FromDiscord | <Chronos [She/Her]> Oh well |
13:19:58 | FromDiscord | <toma400> sent a long message, see http://ix.io/4GrH |
13:20:30 | FromDiscord | <toma400> In reply to @chronos.vitaqua "Honestly all I need": Oh yeah, that sounds pretty good as well. Java seem like good language to make codegen for, given its verbosity đ
|
13:20:30 | FromDiscord | <toma400> (edit) "verbosity" => "verbosity, but also direct structure" |
13:21:25 | FromDiscord | <Chronos [She/Her]> Yeah haha |
13:21:29 | FromDiscord | <Chronos [She/Her]> It'll still suck majorly though aha |
13:21:41 | FromDiscord | <Chronos [She/Her]> The language will likely have major differences tho |
13:21:45 | FromDiscord | <jviega> amd64 and arm, don't think there's anything else worth supporting. When Java came out, there were two Sun hardware platforms, an IBM one, a DEC one, an SGI one, Intel, Motorolla, and probably 3 or 4 others I'm forgetting about, and the OSes were much more diverse than they are now |
13:22:15 | FromDiscord | <Chronos [She/Her]> Risc-V is gaining traction though, there's even a laptop released using a Risc-V CPU now apparently |
13:22:36 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "amd64 and arm, don't": Yeah that's fair though |
13:23:26 | FromDiscord | <jviega> Posix is also far broader than it was then, and very well implemented. |
13:24:30 | FromDiscord | <jviega> Across any platform even remotely unix based, which has become almost all of them (Mac wasn't at the time), you can reliably target the Posix API |
13:25:16 | FromDiscord | <jviega> So the JVM is just overhead and cruft now that it's far more practical to automatically target all hardware your users are likely to use. |
13:25:56 | FromDiscord | <jviega> Even if that becomes 3 platforms, the JVM is still a solution to a portability problem the world currently doesn't have, so it seems like a dinosaur |
13:27:23 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Across any platform even": Windows is an exception now, no? |
13:27:32 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Even if that becomes": How about WASM, what do you think about that? |
13:33:39 | NimEventer | New thread by sls1005: Usage of rawProc, see https://forum.nim-lang.org/t/10485 |
13:52:41 | * | PMunch quit (Quit: Leaving) |
13:56:42 | * | ntat joined #nim |
13:59:20 | * | genr8eofl quit (Ping timeout: 255 seconds) |
14:02:00 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "Minecraft modding is the": i wrote an extension for Burp Suite which uses Graal's polyglot functionality and lets the user load up scripts in any polyglot-supported language (this isn't it's _main_ feature, just a neat thing to show off). Currently I'm fronting javascript for it but it works with any Polyglottable language |
14:02:18 | FromDiscord | <Chronos [She/Her]> Burp Suite? |
14:02:59 | FromDiscord | <nnsee> not really important here, but it's a local proxy application tailored for web app pentesters |
14:03:13 | FromDiscord | <nnsee> what's important is that it's a Java application :p |
14:04:21 | FromDiscord | <nnsee> the neat thing is that my extension doesn't require the host to run a graal JVM at all, the polyglot functionality can be loaded into any Java runtime (which I do - although without Graal, it's a tad bit slower) |
14:05:20 | FromDiscord | <Chronos [She/Her]> I'm pretty sure SuLong is the exception which is the issue |
14:05:56 | FromDiscord | <Chronos [She/Her]> Hm... debating on if I should take a crack again at making a JVM backend for Nim |
14:06:05 | * | jmdaemon quit (Ping timeout: 248 seconds) |
14:06:57 | FromDiscord | <Chronos [She/Her]> I could modify jsgen this time |
14:07:05 | FromDiscord | <Chronos [She/Her]> Instead of trying to roll my own |
14:07:09 | FromDiscord | <Chronos [She/Her]> Hm... |
14:08:43 | FromDiscord | <nnsee> here's a cursed idea: run the jsgen'd code using Truffle |
14:09:22 | FromDiscord | <Chronos [She/Her]> Slow though |
14:09:32 | FromDiscord | <Chronos [She/Her]> Also I'd imagine it wouldn't run too well |
14:10:00 | FromDiscord | <Chronos [She/Her]> Also Nim's JS is meant for web, Truffle also does web JS (and doesn't support using NodeJS interop from Java) |
14:10:28 | FromDiscord | <Chronos [She/Her]> And most stuff just doesn't work with js purely because certain libs aren't available |
14:12:07 | FromDiscord | <Chronos [She/Her]> With Java, a lot more libs can be filled |
14:12:39 | FromDiscord | <Chronos [She/Her]> In reply to @chronos.vitaqua "Also I'd imagine it": (Because of Nim generating a lot of code occasionally, with Java this isn't as much of an issue bc the compiler optimises it) |
14:12:58 | FromDiscord | <Chronos [She/Her]> Also would be fun to see if the entire compiler could be compiled to Java too |
14:13:16 | FromDiscord | <nnsee> I don't really know about Nim's jsgen capabilities, but considering it has a `-d:nodejs` which enables NodeJS features, I wouldn't say it's "just for the web" |
14:13:27 | FromDiscord | <nnsee> at least the hello world works :p https://media.discordapp.net/attachments/371759389889003532/1152245799867129898/image.png |
14:13:34 | FromDiscord | <nnsee> there you go, nim on the jvm |
14:13:35 | FromDiscord | <Chronos [She/Her]> That doesn't do much, still supports barely anything |
14:14:24 | FromDiscord | <nnsee> although I have no idea how you would do java interop with this :p |
14:14:57 | FromDiscord | <Chronos [She/Her]> https://nim-lang.org/docs/backends.html#backends-the-javascript-target |
14:15:11 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "although I have no": Likely a lot of `Java.type`s and similar |
14:18:10 | FromDiscord | <nnsee> oh, the `-d` flag just _runs_ it with node |
14:18:14 | FromDiscord | <nnsee> that's kind of underwhelming |
14:18:21 | FromDiscord | <Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/Nimpiler also realised I have this abomination from ages ago xD |
14:18:43 | FromDiscord | <Chronos [She/Her]> Nimskull folks helped me a lot tho and I appreciate it even tho it wen't nowhere in the end |
14:25:47 | FromDiscord | <nnsee> well this was incredibly surprising |
14:26:20 | FromDiscord | <nnsee> the JS code seems to run faster on the JVM than using node... (in this one specific benchmark I got from the first result of google) |
14:26:36 | FromDiscord | <nnsee> https://media.discordapp.net/attachments/371759389889003532/1152249108661284914/image.png |
14:27:04 | FromDiscord | <nnsee> is there a large collection of nim benchmarks anywhere? |
14:27:37 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "is there a large": Not sure |
14:27:43 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "the JS code seems": Hm odd |
14:27:58 | FromDiscord | <Chronos [She/Her]> I mean tbf V8 is bulkier |
14:29:14 | FromDiscord | <nervecenter> Is this using Nashorn? |
14:29:16 | FromDiscord | <nnsee> I would've V8 to be slightly faster or maybe on par, but not 3x slower (i'm not measuring startup, just actual runtime) |
14:29:23 | FromDiscord | <nnsee> In reply to @nervecenter "Is this using Nashorn?": no, Graal |
14:29:31 | FromDiscord | <nnsee> graaljs specifically |
14:29:40 | FromDiscord | <nervecenter> that might explain it, Graal is an optimizing compiler is it not? |
14:30:39 | FromDiscord | <nnsee> I mean so is V8 |
14:30:42 | FromDiscord | <nnsee> both are JIT compilers |
14:31:06 | FromDiscord | <nervecenter> Yeah but V8 can only compile some subset of what it's fed, the rest has to be interpreted |
14:31:31 | FromDiscord | <nervecenter> Graal has to find a way to compile all the JS code to JVM bytecode, right? |
14:31:42 | FromDiscord | <Chronos [She/Her]> They still have an interpreted mode |
14:32:48 | FromDiscord | <Chronos [She/Her]> I'd know bc I used to do some small work on Grakkit lol, was something that used GraalJS to let you make MC plugins for Spigot with JS |
14:33:19 | FromDiscord | <nnsee> that sounds incredibly similar to my burp extension |
14:34:40 | FromDiscord | <Chronos [She/Her]> Oh? |
14:41:45 | FromDiscord | <Chronos [She/Her]> Hm... Trying to think about how I should work on my java backend |
14:41:57 | FromDiscord | <Chronos [She/Her]> Fork the compiler or use it as a library hm... |
14:50:13 | FromDiscord | <Chronos [She/Her]> Incremental compilation is uselsss currently, right? In the code (as in no reason to implement it in my project as the work needed isn't done on the Nim compiler side) |
14:55:05 | FromDiscord | <Chronos [She/Her]> GC stuff is useless to me, right? Because, Java has many GCs- |
14:55:13 | FromDiscord | <Chronos [She/Her]> Sigh this is how I lose motivation~ |
14:56:13 | FromDiscord | <nnsee> i would assume so |
14:56:17 | FromDiscord | <nnsee> same for the js backend, no? |
15:03:21 | FromDiscord | <Phil> TFW you can't assign to nil because that segfaults |
15:04:06 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "same for the js": Yeah |
15:04:35 | FromDiscord | <nnsee> all of the benchmarks i've run have been faster on the graal js implementation than on node |
15:04:41 | FromDiscord | <nnsee> this is... very surprising to me |
15:04:57 | FromDiscord | <nnsee> the nim benchmarks, specifically |
15:05:22 | FromDiscord | <nomad> sent a code paste, see https://play.nim-lang.org/#ix=4Gsj |
15:05:42 | FromDiscord | <nnsee> install zlib? |
15:06:04 | FromDiscord | <nomad> https://zlib.net ? |
15:07:50 | FromDiscord | <nomad> or from where? |
15:08:10 | FromDiscord | <nomad> i dont know much about headers and C and all that |
15:14:28 | FromDiscord | <Phil> sent a long message, see http://ix.io/4Gsp |
15:14:41 | FromDiscord | <Phil> (edit) "http://ix.io/4Gsp" => "http://ix.io/4Gsq" |
15:14:48 | FromDiscord | <nomad> omg đ |
15:14:50 | FromDiscord | <Phil> Where I'd just go to my package manager and type in "please install zlip" |
15:14:53 | FromDiscord | <Phil> (edit) "zlip"" => "zlib"" |
15:17:39 | FromDiscord | <Phil> Pointers. are. hell. |
15:17:49 | FromDiscord | <enthus1ast> @nomad\: just put it somewhere mingw is looking for includes and/or add the path where the stuff lies to mingw include path (-I) |
15:18:38 | FromDiscord | <nomad> idek where zlib is đ |
15:18:59 | FromDiscord | <enthus1ast> why are you want to use zip anyhow? |
15:19:13 | FromDiscord | <Phil> enthus1ast with the greatest of english |
15:19:13 | FromDiscord | <enthus1ast> why not just use zippy? (pure nim zip library) |
15:19:29 | FromDiscord | <nomad> appearently i need zlib.h to send post requests |
15:19:32 | FromDiscord | <nomad> :// |
15:19:39 | FromDiscord | <enthus1ast> what? |
15:19:41 | FromDiscord | <Phil> code or it didn't happen! |
15:19:51 | FromDiscord | <enthus1ast> post requests with what? |
15:19:58 | FromDiscord | <nomad> puppy |
15:21:23 | FromDiscord | <enthus1ast> mh puppy uses zippy |
15:21:58 | FromDiscord | <nomad> then idk whats the error |
15:22:14 | FromDiscord | <nomad> im gonna do some more debugging |
15:22:24 | FromDiscord | <enthus1ast> to which api you wanna send requests to? |
15:22:26 | FromDiscord | <nomad> my own |
15:22:59 | FromDiscord | <enthus1ast> can you try\:â”â”nimble remove puppyâ”numble install puppy |
15:23:04 | FromDiscord | <enthus1ast> nimble^ |
15:23:15 | FromDiscord | <nomad> sent a code paste, see https://play.nim-lang.org/#ix=4Gsw |
15:23:15 | FromDiscord | <nomad> so thats not the error |
15:23:22 | FromDiscord | <nomad> In reply to @enthus1ast "can you try\: ": sure |
15:23:23 | FromDiscord | <enthus1ast> well |
15:23:37 | FromDiscord | <enthus1ast> maybe the js code sets a compression header |
15:23:47 | FromDiscord | <nomad> OH WAIT |
15:24:04 | FromDiscord | <nomad> DOESNT PUPPY AUTOMATICALLY MAKE SOME HEADER THING GZIP IF EMPTY |
15:24:07 | FromDiscord | <nomad> that might be the error here |
15:24:29 | FromDiscord | <enthus1ast> but it uses zippy which imho can actually do zlib |
15:24:53 | FromDiscord | <enthus1ast> idk where zlib comes from actually |
15:25:49 | FromDiscord | <enthus1ast> "Zippy is an implementation of DEFLATE, ZLIB and GZIP data compression formats." |
15:26:01 | FromDiscord | <enthus1ast> so it CAN do zlib on its own |
15:26:36 | FromDiscord | <nomad> alr |
15:26:36 | FromDiscord | <enthus1ast> i would reinstall puppy and zippy and see if you just had an ancient version |
15:27:48 | FromDiscord | <enthus1ast> for me, puppy worked remarkably good so far, i use it quite often |
15:29:31 | FromDiscord | <enthus1ast> hey, i give my best here \:)â”(@Phil) |
15:34:22 | FromDiscord | <jviega> @Chronos [She/Her] I like WASM. Browsers shouldn't let untrusted people run native code, and it's much more appropriate than the JVM for that use case. |
16:07:20 | * | junaid_ joined #nim |
16:19:56 | FromDiscord | <millymox> Any prospect for NIM on Android app development? Or IOS? |
16:20:19 | FromDiscord | <millymox> (edit) "NIM" => "nim" |
16:23:06 | FromDiscord | <Langosta> In reply to @millymox "Any prospect for nim": https://github.com/treeform/glfm |
16:23:16 | FromDiscord | <Langosta> This is what I have found regarding mobile |
16:31:16 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "<@524288464422830095> I like WASM.": Neato! |
16:32:10 | FromDiscord | <Chronos [She/Her]> What do you think about using it for plugin systems, for example? For games or similar |
16:32:42 | * | azimut quit (Ping timeout: 246 seconds) |
16:39:11 | * | calebjohn quit (Server closed connection) |
16:39:35 | * | calebjohn joined #nim |
16:47:48 | FromDiscord | <jmgomez> In reply to @millymox "Any prospect for nim": There is also NimForUE |
16:48:18 | * | disso-peach quit (Quit: Leaving) |
17:05:43 | FromDiscord | <taperfade> |
17:06:51 | * | krux02 quit (Remote host closed the connection) |
17:24:43 | FromDiscord | <bhunao> yo, anyone here know a lot of git? |
17:25:11 | * | attah quit (Read error: Connection reset by peer) |
17:25:31 | FromDiscord | <bhunao> i wanna create a repo to save notes and auto commit |
17:25:45 | FromDiscord | <bhunao> but i don't know where do even start |
17:26:02 | FromDiscord | <Chronos [She/Her]> Debating on if I should just remake Nim's CLI stuff for my JVM backend |
17:27:07 | FromDiscord | <Chronos [She/Her]> Yeah I'll prolly do that, since that way I can properly understand the code |
17:29:01 | * | attah joined #nim |
17:29:10 | FromDiscord | <Langosta> In reply to @bhunao "yo, anyone here know": I'm not as versed in git, but I took a free course that was very helpful |
17:29:16 | FromDiscord | <Langosta> I could link if you're interested |
17:29:54 | FromDiscord | <Langosta> As for auto-commits, that may be a simple shell script on your host that you can set on a timer/event |
17:30:40 | FromDiscord | <bhunao> i know how to use git, just wanna know if theres a good way of doing that ideia |
17:31:08 | FromDiscord | <Langosta> I see, I apologize |
17:31:26 | FromDiscord | <bhunao> no need for apologies |
17:31:32 | FromDiscord | <bhunao> u did nothing wrong |
17:38:59 | FromDiscord | <bhunao> In reply to @alendrik "As for auto-commits, that": gonna try to make this with nim |
17:42:16 | FromDiscord | <Langosta> oooo, I definitely think you can do it in nim too |
17:42:31 | FromDiscord | <Langosta> that'd a cool project |
18:05:56 | FromDiscord | <frobnicate> In reply to @millymox "Any prospect for nim": I'm trying to figure out porting to Android without Android studio but it sucks |
18:11:41 | * | advesperacit_ joined #nim |
18:11:43 | * | advesperacit quit (Ping timeout: 264 seconds) |
18:13:39 | FromDiscord | <Chronos [She/Her]> In reply to @frobnicate "I'm trying to figure": Porting? |
18:18:04 | FromDiscord | <Chronos [She/Her]> Need to figure out how to accept define flags like how Nim does |
18:18:16 | FromDiscord | <Chronos [She/Her]> With cligen |
18:23:46 | * | krux02 joined #nim |
18:51:26 | FromDiscord | <gnubyte> Howdy, was wondering if anyones familiar with the Norm library (ORM)? A lot of ORMs have like a DB init or startup to create the initial tables but I wasn't seeing that in norm's docs. Anyone know if thats a thing? |
19:10:08 | * | advesperacit_ quit (Ping timeout: 244 seconds) |
19:10:50 | * | advesperacit joined #nim |
19:12:52 | FromDiscord | <gnubyte> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1152315760803315793): Howdy, was wondering if anyones familiar with the Norm library (ORM)? A lot of ORMs have like a DB init or startup to create the initial tables but I wasn't seeing that in norm's docs. Anyone know if thats a thing?â”â”edit\: Nevermind I'm seeing a statement to call createTables. I think Im set. |
19:27:21 | FromDiscord | <raynei486> In reply to @bhunao "i wanna create a": you can make a script to auto commit, then if you need more flexibility there's hooks |
19:27:30 | FromDiscord | <raynei486> pretty sure there's hooks for commit messages? |
19:27:37 | FromDiscord | <raynei486> if you're into that |
19:30:32 | * | om3ga quit (Read error: Connection reset by peer) |
19:33:17 | * | om3ga joined #nim |
19:34:34 | FromDiscord | <bhunao> In reply to @raynei486 "you can make a": can you explain me what are hooks? i'm confused by this word |
19:56:37 | FromDiscord | <Phil> In reply to @jviega "<@524288464422830095> I like WASM.": How does WASM address this usecase?â”In the end you can just serve a WASM program and the browser will eat and execute it, no? â”I haven't used WASM myself so no idea if there are additional mechanisms that enable trusting anything from or happening in a browser in any capacity. |
19:57:35 | FromDiscord | <Phil> In reply to @bhunao "gonna try to make": bash script on a cronjob if you're on Linux |
19:58:01 | FromDiscord | <jviega> Notice how browsers already have a sandbox for JavaScript |
19:58:48 | FromDiscord | <jviega> Just need to be able to use languages other than JavaScript đ |
19:58:53 | FromDiscord | <Phil> In reply to @bhunao "can you explain me": Git has hook file. You actually already have some dummy files in your .git folders in your projects |
19:59:07 | FromDiscord | <Phil> In reply to @jviega "Just need to be": Ohhhh you meant it's safer by virtue of not having access to the native environment and that is the safe part of it |
19:59:11 | FromDiscord | <Phil> Okay that I get |
19:59:19 | FromDiscord | <Phil> (edit) "file." => "files." |
19:59:37 | FromDiscord | <jviega> Yup |
19:59:58 | FromDiscord | <Phil> Git executes those hook files when the scenario is triggered.â”https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooksâ”For docs on it |
20:00:00 | FromDiscord | <Phil> (edit) |
20:00:20 | FromDiscord | <Phil> (edit) "is triggered.â”https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooksâ”For" => "for that hook occurs.â”https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooksâ”For" |
20:04:03 | * | ntat quit (Quit: leaving) |
20:12:56 | FromDiscord | <bhunao> In reply to @isofruit "<@108320936549158912> Git executes": ty, gonna take a look |
20:15:26 | * | junaid_ quit (Remote host closed the connection) |
20:35:39 | * | advesperacit quit () |
20:35:57 | FromDiscord | <acornes> is it possible to use nim for github pages? |
20:36:08 | FromDiscord | <raynei486> as in html? |
20:36:21 | FromDiscord | <acornes> like use jester for github pages |
20:38:25 | FromDiscord | <Phil> In reply to @acornes "like use jester for": I'm fairly sure github doesn't allow you to execute server-side code period. It does allow you to use it as a server to serve files and thus static webpages, like nimibook uses it for |
20:38:34 | FromDiscord | <Phil> (edit) "code" => "codem" |
20:38:39 | FromDiscord | <Phil> (edit) "codem" => "code," |
20:39:37 | FromDiscord | <acornes> oooh ok thanks, i was setting up my page and in github actions i searched nim by curiosity and saw a couple things |
20:39:51 | FromDiscord | <acornes> https://github.com/marketplace/actions/install-nim |
20:40:09 | FromDiscord | <Phil> In reply to @acornes "oooh ok thanks, i": Yeh that's to one-time execute nim-code in order to build pages |
20:40:25 | FromDiscord | <Phil> But you don't get to have a server to permanently execute code on said github pages |
20:41:15 | FromDiscord | <Phil> In reply to @acornes "oooh ok thanks, i": Sidenote, if you want workflow examples to run tests and generate and deploy docs I've got various examples in a documentation-repo I maintain on github should you want |
20:41:19 | FromDiscord | <Phil> (edit) removed "should you want" |
20:41:50 | FromDiscord | <acornes> oooh alright thank you |
20:59:08 | * | jmdaemon joined #nim |
21:03:45 | FromDiscord | <kingterrytheterrible12> does nim have something like java interfaces |
21:06:50 | FromDiscord | <_gumbercules> No |
21:07:05 | FromDiscord | <_gumbercules> People have added support for interfaces via macros |
21:07:11 | FromDiscord | <kingterrytheterrible12> đ |
21:07:18 | FromDiscord | <_gumbercules> well you don't need interfaces with Nim really |
21:07:25 | FromDiscord | <_gumbercules> you can get away with using parametric polymorphism + concepts |
21:07:32 | FromDiscord | <Phil> sent a long message, see http://ix.io/4GtN |
21:07:36 | FromDiscord | <Langosta> I meannnn Javva interfaces are basically types that guarantee behavior |
21:07:38 | FromDiscord | <_gumbercules> and you have something that works similar to an interface or behavior or trait or whatever |
21:07:43 | FromDiscord | <Langosta> so by design, the type system does that |
21:07:56 | FromDiscord | <Phil> (edit) "http://ix.io/4GtN" => "http://ix.io/4GtO" |
21:08:04 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Not fully. An interface": alright thanks |
21:08:45 | FromDiscord | <Phil> (edit) "http://ix.io/4GtO" => "http://ix.io/4GtQ" |
21:08:53 | FromDiscord | <Phil> (edit) "http://ix.io/4GtQ" => "http://ix.io/4GtR" |
21:27:05 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "But you don't get": Not with that attitude you can't! |
21:27:42 | FromDiscord | <Chronos [She/Her]> Compile a C compiler to WASM (that can output WASM) then compile Nim itself to WASM then just fill some missing WASI functions, ez |
21:29:31 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Compile a C compiler": Reasonably sure that still only executes in your browser and any RPC calls or the like to github itself will fail because the process that'd need to run there would be stopped đ |
21:29:54 | FromDiscord | <Chronos [She/Her]> Ehhhh fair enough |
21:31:28 | FromDiscord | <Langosta> Pages is only for static pages |
21:31:36 | FromDiscord | <Langosta> so like, nothing at all will run on backend |
21:32:15 | FromDiscord | <Chronos [She/Her]> ~~Long running GitHub action~~ |
21:41:32 | * | nmz quit (Server closed connection) |
21:41:42 | * | nmz joined #nim |
21:51:06 | * | disso-peach joined #nim |
22:06:03 | FromDiscord | <millymox> You guys should make a channel for crypto (not cryptocurrency, cryptographic algs) |
22:07:19 | FromDiscord | <raynei486> that could be #security |
22:24:56 | FromDiscord | <that_dude.> Or #science |
22:31:31 | FromDiscord | <Langosta> In reply to @millymox "You guys should make": ya, that's in science |
22:39:20 | FromDiscord | <raynei486> Is there any tutorials on writing macros |
22:39:24 | FromDiscord | <raynei486> other than the official one |
22:56:02 | FromDiscord | <Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 |
23:00:58 | FromDiscord | <Phil> sent a long message, see http://ix.io/4Gue |
23:02:02 | FromDiscord | <Phil> (edit) "http://ix.io/4Gue" => "http://ix.io/4Guf" |
23:02:33 | FromDiscord | <Phil> I guess 4) There's so many nimnode kinds it makes no sense to learn them all by heart |
23:03:12 | FromDiscord | <raynei486> Everything is just `NimNode`? |
23:04:07 | FromDiscord | <Phil> Everything is just a bunch of NimNodes containing other NimNodes, containing even more NimNodes. |
23:04:10 | FromDiscord | <_gumbercules> In the ast |
23:05:54 | FromDiscord | <_gumbercules> Before it is lowered to C or C++ etc |
23:06:02 | FromDiscord | <_gumbercules> Via codegen |
23:06:28 | FromDiscord | <_gumbercules> Nims macros are simply ast munging |
23:07:53 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Gug |
23:08:33 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4Gug" => "https://play.nim-lang.org/#ix=4Guh" |
23:11:05 | FromDiscord | <Phil> And like that is at least how I proceed with macros all the time:â”I am aware of the nim syntax I want, I look via dumpTree how the AST (Abstract syntax tree) for that is structured and look at how I can generate that exact same AST.â”Then I define myself what the user should write, write a macro that accepts that input (the "input AST"), parses the relevant necessary info out of the AST and generates the actual AST I want and returns that |
23:11:37 | FromDiscord | <Phil> (edit) "And like that is at least how I proceed with macros all the time:â”I am aware of the nim syntax I want, I look via dumpTree how the AST (Abstract syntax tree) for that is structured and look at how I can generate that exact same AST.â”Then I define myself what the user should write, write" => "sent" | "macro that accepts that input (the "input AST"), parses the relevant necessary info out of the AST and generates the actual AST I |
23:11:47 | FromDiscord | <Phil> (edit) "http://ix.io/4Guk" => "http://ix.io/4Gul" |
23:26:28 | FromDiscord | <millymox> sent a code paste, see https://paste.rs/HugHM |
23:27:10 | FromDiscord | <millymox> The entire message decrypts fine, âThis is a test message.â But is followed by⊠some characters? |
23:33:31 | FromDiscord | <Elegantbeef> The best description of Nim macros really are "User defined compiler passes" |
23:34:41 | FromDiscord | <Phil> While that's true, if you start with zero knowledge that statement about tells you nothing |
23:35:28 | FromDiscord | <demotomohiro> Macro is like writing Nim code that generates Nim code (actually NimNode) |
23:35:51 | FromDiscord | <_gumbercules> Metaprogramming |
23:36:02 | FromDiscord | <_gumbercules> Writing a program that programs itself |
23:36:45 | FromDiscord | <demotomohiro> In reply to @_gumbercules "Metaprogramming": Exactly |
23:43:51 | FromDiscord | <astrolemonade> Is Mastering Nim relevant for Nim 2. Also: is there a place to buy Mastering Nim at a cheaper price+elecronic version? On Amazon it's expensive. |
23:45:39 | FromDiscord | <kingterrytheterrible12> In reply to @astrolemonade "Is Mastering Nim relevant": what is that |
23:54:49 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "what is that": Araqs book |
23:54:57 | FromDiscord | <kingterrytheterrible12> wheresit at |
23:55:37 | FromDiscord | <Phil> In reply to @astrolemonade "Is Mastering Nim relevant": There's a mastering nim 2.0 which has an electronic version the prior one didn't offer.â”And yeah that one is I think specifically aimed at 2.0 as I'm willing to bet it also includes ARC/ORC |
23:55:56 | FromDiscord | <Phil> In reply to @kingterrytheterrible12 "wheresit at": Amazon. Note that you shou |
23:56:03 | FromDiscord | <Phil> (edit) "shou" => "should pay close attention to what the book is" |
23:56:10 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "Amazon. Note that you": i aint buying shit |
23:56:13 | FromDiscord | <Phil> There's plenty a scam book on there, written together via AI and not proof-read |
23:56:22 | FromDiscord | <kingterrytheterrible12> the book is not FREE AS IN FREEDOM |
23:58:14 | FromDiscord | <Phil> If you want a book thrown at you, read the manual and module-docs đ |