<< 30-09-2022 >>

00:05:06FromDiscord<auxym> @sOkam! this too: https://nim-lang.org/docs/system.html#currentSourcePath.t
00:07:27FromDiscord<sOkam!> Solution to this one unique problem exists, as mentioned. Ty↵Still, my point still stands in that working nimscript feels extremely limited↵Does someone know if that is meant to be improved over time, or is that something not desirable for w/e reason i'm unaware of?
00:15:48FromDiscord<demotomohiro> I guess people use nim script only for simple program and doesn't need to use all stdlib most of time.
00:17:04FromDiscord<demotomohiro> If you need to use all Nim features, you can create executable file with `nim c` or `nim cpp`.
00:19:25*wallabra quit (Ping timeout: 252 seconds)
00:19:35*wallabra joined #nim
00:24:35*sagax quit (Ping timeout: 244 seconds)
00:27:06FromDiscord<exelotl> nimscript could really benefit from being able to get the modification date of a file tbh
00:28:20FromDiscord<exelotl> one of it's best use cases is for build tasks but there's no way to skip work if a file didn't change
00:40:02*genpaku quit (Remote host closed the connection)
00:40:42*genpaku joined #nim
01:00:37*sagax joined #nim
01:12:22*derpydoo joined #nim
01:44:17*wallabra_ joined #nim
01:45:15*wallabra quit (Ping timeout: 265 seconds)
01:49:59*wallabra_ quit (Ping timeout: 252 seconds)
01:50:01*wallabra joined #nim
02:01:00FromDiscord<wiga> any way to get shell command output?
02:01:12FromDiscord<wiga> i know i asked or some else asked here
02:01:26FromDiscord<wiga> but i dont remember where lol
02:01:37FromDiscord<wiga> (edit) "some" => "someone"
02:15:34*derpydoo quit (Ping timeout: 268 seconds)
02:19:38*arkurious quit (Quit: Leaving)
03:10:24*wallabra_ joined #nim
03:11:23*wallabra quit (Ping timeout: 252 seconds)
03:12:43*wallabra_ is now known as wallabra
03:37:30*rockcavera quit (Remote host closed the connection)
04:24:01*wallabra_ joined #nim
04:24:19*wallabra quit (Ping timeout: 244 seconds)
04:26:15*wallabra_ is now known as wallabra
04:51:19FromDiscord<that_dude> Are you looking for something like echo?
05:17:33FromDiscord<demotomohiro> In reply to @wiga "any way to get": https://nim-lang.org/docs/osproc.html
05:35:30*wallabra_ joined #nim
05:35:48*wallabra quit (Ping timeout: 264 seconds)
05:37:17*wallabra_ is now known as wallabra
05:39:50*xilo joined #nim
05:43:27*dnh joined #nim
06:26:59FromDiscord<Horizon [She/Her]> Wonder how difficult it'd be to compile JVM bytecode to Nim code
06:27:11FromDiscord<Horizon [She/Her]> Since it can be done, someone did it with Python a long time ago
06:27:17FromDiscord<Horizon [She/Her]> They used Python bytecode tho
06:28:31FromDiscord<Horizon [She/Her]> (JVM bytecode to Python bytecode)
06:29:46FromDiscord<Rika> It can be done but it isn’t practical
06:29:52FromDiscord<Rika> I don’t think it is, at least
06:35:09FromDiscord<Horizon [She/Her]> I don't see how it could be practical at all either haha
06:35:28FromDiscord<Horizon [She/Her]> Just would be a very interesting project for the future
06:39:11FromDiscord<Prestige> In reply to @Event Horizon "Wonder how difficult it'd": would there be a use?
06:39:48*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:44:32FromDiscord<Horizon [She/Her]> Using Java libraries natively in Nim
06:44:46FromDiscord<Horizon [She/Her]> Wouldn't exactly have a use though I'd imagine
06:47:43*wallabra quit (Ping timeout: 252 seconds)
06:48:04*wallabra joined #nim
06:50:18FromDiscord<Rika> In reply to @Event Horizon "Using Java libraries natively": You’d still have to make it friendly to use
06:58:54*dnh joined #nim
07:22:03FromDiscord<Horizon [She/Her]> Yup exactly
07:22:13FromDiscord<Horizon [She/Her]> It'd be a massive pain but interesting
07:22:25FromDiscord<Horizon [She/Her]> Also need to reimplement Java standard libraries too which won't be fun
07:51:21FromDiscord<Horizon [She/Her]> Is it safe to assume that `initObjectName` and `newObjectName` are likely the constructors for creating a new Nim object?
07:51:26FromDiscord<Horizon [She/Her]> For user defined types
07:51:35FromDiscord<Horizon [She/Her]> And if they don't conform, that's their own fault?
07:51:55FromDiscord<Elegantbeef> Even saner to look for `proc init(_: typedesc[T])`
07:52:11FromDiscord<Elegantbeef> The stdlib doesnt use it but it's just better
07:52:41FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "Even saner to look": I liked that too but i thought it was bad practice
07:52:49FromDiscord<Elegantbeef> It's not
07:53:02FromDiscord<Elegantbeef> `newT` is bad practice
07:53:06FromDiscord<Elegantbeef> Due to the fact it's not generic supporting
07:53:29FromDiscord<Elegantbeef> You cannot make a proc that operates on `newT` without macros, you can make a proc that works on `T.new`
07:53:52FromDiscord<Horizon [She/Her]> Wdym by that?
07:53:57FromDiscord<Horizon [She/Her]> Don't think i understand completely
07:54:42FromDiscord<Horizon [She/Her]> Would `MyObjectChild.new` work when `proc init(_: typedesc[MyObject])` is defined?
07:54:52FromDiscord<Rika> You can’t make a function that takes a generic T use a function called newT
07:55:02FromDiscord<Horizon [She/Her]> (edit) "init(_:" => "new(_:"
07:55:10FromDiscord<Rika> Because that needs name substitution or whatever it’s called
07:55:20FromDiscord<Horizon [She/Her]> Ah
07:55:43FromDiscord<Rika> If you use new(…: typedesc[T]) then your function could just pass the generic T in
07:56:35FromDiscord<Horizon [She/Her]> Ah that makes sense
07:57:32*kenran joined #nim
08:11:21*wallabra quit (Ping timeout: 268 seconds)
08:12:20*wallabra joined #nim
08:16:00*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:20:22NimEventerNew thread by konradmb: How to chain anonymous proc with UFCS?, see https://forum.nim-lang.org/t/9500
08:30:19*dnh joined #nim
08:34:54*kenran quit (Remote host closed the connection)
08:35:27*kenran joined #nim
08:57:05*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:02:20*dnh joined #nim
09:06:30NimEventerNew thread by drkameleon: Getting pointer to a seq, see https://forum.nim-lang.org/t/9501
09:21:24*wallabra quit (Ping timeout: 264 seconds)
09:22:06*xilo left #nim (#nim)
09:22:30*wallabra joined #nim
09:31:50*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:32:00*Vladar joined #nim
09:59:25*dnh joined #nim
10:27:45*ggsx joined #nim
10:44:41*wallabra quit (Ping timeout: 250 seconds)
10:45:59*wallabra joined #nim
10:47:00FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bTv
10:47:06FromDiscord<4zv4l> is this because of the slice ?
10:47:29FromDiscord<4zv4l> if yes how can I do to not use allocation ?
10:47:36FromDiscord<Rika> what does the echo show you
10:47:45FromDiscord<4zv4l> `@['S', 'a', 'l', 'u', 't', '\n']`
10:51:14FromDiscord<Rika> toopenarray perhaps would help
10:51:45FromDiscord<Rika> prolly needs experimental views enabled
10:51:55FromDiscord<Rika> im not familiar with it so i cant help much past that
10:52:24FromDiscord<4zv4l> I did this
10:52:30FromDiscord<4zv4l> xD look like C too in that way
10:52:31FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bTy
10:52:38FromDiscord<4zv4l> In reply to @Rika "toopenarray perhaps would help": I'll try that
10:53:34FromDiscord<4zv4l> In reply to @Rika "toopenarray perhaps would help": indeed that works !
10:53:36FromDiscord<4zv4l> thanks ^^
10:58:53*wallabra quit (Ping timeout: 252 seconds)
11:01:03FromDiscord<ShalokShalom> whats the formatting meaning? https://media.discordapp.net/attachments/371759389889003532/1025361629786943498/unknown.png
11:01:21FromDiscord<ShalokShalom> Why is there command: string; and workingDir: string = "";
11:01:49FromDiscord<ShalokShalom> Whats the difference, why does workingDir actually put = ""
11:02:13FromDiscord<ShalokShalom> And command only shows the type, isnt it expected for both to provide a string
11:02:19FromDiscord<Yardanico> because "" is the default value for the argument, so you don't need to put it, then it'll default to this value
11:02:28FromDiscord<Yardanico> command only shows the type because it's a required argument, there's no default value
11:02:35FromDiscord<Yardanico> https://nim-lang.org/docs/tut1.html#procedures-default-values
11:05:44FromDiscord<4zv4l> `Error: invalid type: 'openArray[char]' for let` what does it mean ?
11:05:55FromDiscord<4zv4l> ` let data = buff.toOpenArray(0, n-1)`
11:07:37FromDiscord<ChocolettePalette> Try making it var
11:08:32FromDiscord<4zv4l> I tried and it showed the same
11:09:10FromDiscord<4zv4l> `Error: invalid type: 'openArray[char]' for var`
11:09:17FromDiscord<Rika> `{.experimental: "views".}`
11:09:23FromDiscord<Rika> top of file
11:09:37FromDiscord<Rika> ofc, know that this is experimental
11:09:51FromDiscord<Rika> https://nim-lang.github.io/Nim/manual_experimental.html#view-types
11:10:43FromDiscord<4zv4l> why is it experimental ? I thought openarray were immutable ? so could be a safe pointer to an array (part of an array) that you cannot modify
11:11:36FromDiscord<Rika> wdym why lol it is because it is
11:11:39FromDiscord<Rika> its a new feature
11:11:49FromDiscord<Rika> openarrays are not "immutable" unless you make them
11:12:01FromDiscord<Rika> even if they were, lifetime considerations are needed
11:12:44FromDiscord<Yardanico> In reply to @4zv4l "why is it experimental": in stable nim `openArray` is just a "meta" type that can only be used in normal routine (func/proc/maybe method) arguments, you can't store it or return it
11:13:06FromDiscord<4zv4l> I thought openArray were immutable
11:13:31FromDiscord<Yardanico> unless you prepend `var` they are, but how does this relate to your question?
11:13:56FromDiscord<Yardanico> ah right, you can use them as a return type, I forgot, but then you have to immediately use the return value, and not store it
11:14:19FromDiscord<Horizon [She/Her]> Wonder if it's feasible to just fork CPython and replacing bits of it with Nim over time
11:14:26FromDiscord<4zv4l> I'm just trying random stuff↵it's just from a 'challenge' I did online, when I got an openArray from a function I couldn't modify it
11:14:27FromDiscord<Yardanico> In reply to @Event Horizon "Wonder if it's feasible": ofc possible, but what for?
11:14:35FromDiscord<Yardanico> you'll end up with C code that's written in Nim syntax style
11:15:02FromDiscord<Yardanico> since you plan on replacing modules one-by-one, you'll have to write everything with the C types and C stdlib in mind
11:15:11FromDiscord<Horizon [She/Her]> Aah true
11:15:29FromDiscord<Horizon [She/Her]> Hm, too big to replace everything at once though lol
11:15:36FromDiscord<Yardanico> and not much reason for ;)
11:15:48FromDiscord<Horizon [She/Her]> Yeah true too lmao
11:16:06FromDiscord<Horizon [She/Her]> I keep forgetting that I'm working on a pure Nim implementation of Lua
11:16:12FromDiscord<Rika> why
11:16:13FromDiscord<Horizon [She/Her]> I just hate parsers :p
11:16:19FromDiscord<Horizon [She/Her]> In reply to @Rika "why": This is for fun
11:16:30FromDiscord<Rika> ok
11:16:32FromDiscord<Horizon [She/Her]> I've wanted to make an interpreter all this time but kept getting stuck on parsers
11:16:39FromDiscord<Rika> then thats that lmao have fun ig?
11:16:51FromDiscord<Horizon [She/Her]> Yeah ofc
11:16:52FromDiscord<Rika> In reply to @Event Horizon "I've wanted to make": why
11:16:59FromDiscord<Rika> why i mean to the stuck
11:17:01FromDiscord<Horizon [She/Her]> ~~when I'm done with a parser~~
11:17:35FromDiscord<Horizon [She/Her]> In reply to @Rika "why i mean to": I just don't understand how it works in general, the examples i read have things like `expr()` with no arguments and it confuses me
11:17:50FromDiscord<Horizon [She/Her]> Like in the scala example I've been following or crafting interpreters (which i used previously)
11:17:57FromDiscord<Horizon [She/Her]> https://www.toptal.com/scala/writing-an-interpreter
11:18:07FromDiscord<Yardanico> why not follow the normal book version?
11:18:12FromDiscord<Yardanico> which has Java and C versions
11:18:19FromDiscord<Rika> the html version is free
11:18:30FromDiscord<Rika> oorc
11:18:33FromDiscord<Rika> (edit) "oorc" => "iirc"
11:18:33FromDiscord<Yardanico> yep
11:18:46FromDiscord<Horizon [She/Her]> In reply to @Yardanico "why not follow the": I did (from the html page which is free), just didn't understand how the parser worked
11:18:48FromDiscord<Horizon [She/Her]> I could write it sure
11:18:51FromDiscord<Yardanico> https://craftinginterpreters.com/contents.html
11:18:52FromDiscord<Horizon [She/Her]> But i wanna understand it
11:19:04FromDiscord<Rika> what was unclear
11:19:05FromDiscord<Yardanico> In reply to @Event Horizon "But i wanna understand": i mean, parser is just parsing things
11:19:12FromDiscord<Yardanico> you go by your language's
11:19:24FromDiscord<Yardanico> you have tokens, and then you go through them and form your AST
11:19:41FromDiscord<Yardanico> like if you see 2 + 2 you get plus operation with left node being 2, and right being 2 (simplified)
11:20:30FromDiscord<Rika> maybe a good analogy is that lexing is like identifying what are words and punctuation, then parsing is understanding the context between the words and punctuation
11:20:39FromDiscord<Rika> though again idk what you dont understand
11:20:43FromDiscord<Horizon [She/Her]> In reply to @Yardanico "like if you see": Hm okay
11:21:02FromDiscord<ShalokShalom> @Yardanico Perfectly explained
11:21:05FromDiscord<ShalokShalom> Thanks a lot
11:21:05FromDiscord<Horizon [She/Her]> In reply to @Rika "though again idk what": Was struggling to grasp how it built the AST just from the tokens
11:21:11FromDiscord<Yardanico> In reply to @Rika "maybe a good analogy": yes
11:21:13FromDiscord<Horizon [She/Her]> Yardanico's explanation helps tho
11:21:23FromDiscord<ShalokShalom> Is this anywhere disclosed, like in documentation?
11:21:26FromDiscord<Yardanico> In reply to @Event Horizon "Was struggling to grasp": you don't just have the tokens, you have your language's grammar - how you expect it to be written
11:21:28FromDiscord<Yardanico> In reply to @ShalokShalom "Is this anywhere disclosed,": which part?
11:21:55FromDiscord<ShalokShalom> About the formatting
11:21:55FromDiscord<Horizon [She/Her]> In reply to @Yardanico "you don't just have": Is the grammar defined in the parser?
11:22:13FromDiscord<ShalokShalom> That = "" is about the default value
11:22:17FromDiscord<Yardanico> In reply to @ShalokShalom "That = "" is": ah
11:22:33FromDiscord<Yardanico> there's always the manual, which is very big, but it covers almost all nim features,
11:22:35FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#procedures
11:22:38FromDiscord<ShalokShalom> or maybe even provide some means of linking such explaination to the examples
11:22:39FromDiscord<Rika> https://nim-lang.org/docs/manual.html#procedures
11:22:41FromDiscord<Rika> fuck
11:22:42FromDiscord<Rika> slow
11:22:42FromDiscord<ShalokShalom> like with a button
11:22:47FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1025367097620045875/unknown.png
11:23:04FromDiscord<ShalokShalom> well, about the formatting of the documentation itself
11:23:05FromDiscord<Yardanico> In reply to @ShalokShalom "like with a button": this would be really too verbose, because as I said before, it's even covered in the first tutorial
11:23:16FromDiscord<Yardanico> In reply to @ShalokShalom "well, about the formatting": well, documentation doesn't have specific formatting for signatures
11:23:18FromDiscord<ShalokShalom> then thats fine
11:23:21FromDiscord<Yardanico> it just shows you the actual signature of the proc
11:23:24FromDiscord<ShalokShalom> well, it seems like?
11:23:26FromDiscord<ShalokShalom> Ah, ok
11:23:36FromDiscord<ShalokShalom> that there is a default value for one, but not the other
11:23:44FromDiscord<Yardanico> yes
11:23:48FromDiscord<ShalokShalom> that is explained in the tut
11:23:49FromDiscord<ShalokShalom> ok
11:23:51FromDiscord<Yardanico> the first argument has no default value, hence it only has `:`
11:23:51FromDiscord<ShalokShalom> thanks
11:24:07FromDiscord<Yardanico> the other arguments have the default value, and actually specifying the type when you have a default value is optional
11:24:14FromDiscord<ShalokShalom> In reply to @Yardanico "the first argument has": the question is, where is this documented?
11:24:19FromDiscord<ShalokShalom> that this is the case
11:24:20FromDiscord<ShalokShalom> this way
11:24:24FromDiscord<Yardanico> ?
11:24:28FromDiscord<Yardanico> it's just documented in the manual
11:24:31FromDiscord<Yardanico> that arguments go by `name: type`
11:24:34FromDiscord<ShalokShalom> how are we supposed to know this
11:24:39FromDiscord<Yardanico> by reading the tutorials or the manual
11:24:48FromDiscord<ShalokShalom> and that = "" is the default value?
11:24:56FromDiscord<ShalokShalom> since that made no sense to me
11:25:00FromDiscord<Yardanico> again, in the manual, it doesn't have to tell specifically about `= ""`
11:25:12FromDiscord<Yardanico> it just talks about default values in general, since in Nim a lot of rules apply to a lot of things, they're not exclusive to something
11:26:05FromDiscord<4zv4l> what happen if `execProcess` return value is too big ?
11:26:22FromDiscord<Yardanico> In reply to @4zv4l "what happen if `execProcess`": as in?
11:27:03FromDiscord<Yardanico> if you mean if the output is really huge (like we're talking hundreds of MBs of text), then you can use `startProcess` and read from the output stream so the whole output doesn't have to be stored in the memory at the same time
11:28:40FromDiscord<4zv4l> alright, that's what I'm trying to do with an iterator↵how can I give it the `ENV` like `PATH` ?
11:28:52FromDiscord<4zv4l> I don't know well ENV things
11:29:01FromDiscord<Yardanico> there's an `env` argument
11:29:28FromDiscord<Yardanico> so you just pass a stringtable (std/strtabs) with a mapping of environment variable names to their values
11:31:01FromDiscord<4zv4l> yeah there is the env argument but I don't know how I can simply give the same env I have in my shell ?
11:31:35FromDiscord<Yardanico> In reply to @4zv4l "yeah there is the": then you probably want to execute the command through the shell
11:31:38FromDiscord<Yardanico> there's an `poEvalCommand` option for that
11:31:42FromDiscord<Yardanico> for `options` argument
11:32:07FromDiscord<Yardanico> or actually if you are launching the nim program that'll launch your program from the same shell, you don't need that
11:32:15FromDiscord<Yardanico> since the nim program will inherit the environment, and pass it to the program it started
11:33:02FromDiscord<4zv4l> wait I didn't get all xD
11:33:07FromDiscord<4zv4l> what do I need to do ?
11:33:34FromDiscord<Yardanico> if you're launching your Nim program from the same shell where you have your environment variables, just use `startProcess` as-is without specifying extra options or the environment
11:34:23FromDiscord<4zv4l> because when I try `ls`↵I get↵`Additional info: Could not find command: 'ls'. OS error: No such file or directory`
11:34:59FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bTH
11:35:27FromDiscord<Yardanico> `ls` is a shell command, not an actual program
11:35:35FromDiscord<Yardanico> so to use it you actually need to use `poEvalCommand`
11:35:38FromDiscord<4zv4l> there is `/bin/ls`
11:35:47FromDiscord<Yardanico> or, if you need `ls` specifically, why not use walkDir from std/os ?
11:36:19FromDiscord<Rika> In reply to @Yardanico "`ls` is a shell": ls has always been a program hasnt it
11:36:19FromDiscord<4zv4l> oh not especially
11:36:21FromDiscord<Rika> cd is the shell command
11:36:30FromDiscord<4zv4l> any commands
11:36:34FromDiscord<4zv4l> not just ls
11:36:45FromDiscord<4zv4l> remote shell basically
11:36:59FromDiscord<4zv4l> that's what I have for now
11:37:00FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bTI
11:37:10FromDiscord<4zv4l> the buff is low to test the loop I made
11:37:14FromDiscord<Rika> remote shell, sus
11:37:33FromDiscord<4zv4l> I made one in C but the algo was bad since I was using a 4kb buffer
11:37:42FromDiscord<4zv4l> I want it to be able to handle any command output
11:38:40FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1025371097937498122/unknown.png
11:38:43FromDiscord<4zv4l> that's weird
11:38:51FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4bTJ
11:39:07FromDiscord<4zv4l> yeah right I could for the command input
11:41:12*Vladar quit (Ping timeout: 265 seconds)
11:41:30FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4bTK
11:41:31FromDiscord<Yardanico> you probably missed the main proc or something
11:41:34FromDiscord<Yardanico> in the paste
11:42:15FromDiscord<4zv4l> this is the main proc
11:42:17FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bTL
11:44:58FromDiscord<Yardanico> well this works fine:
11:45:06FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4bTN
11:45:08FromDiscord<Yardanico> I really hope you're not going to create some ransomware or a trojan with this
11:45:11FromDiscord<Yardanico> surely not :)
11:45:46FromDiscord<Yardanico> and yeah, I kind of don't like `defer` and it's half-deprecated, so I used `finally` instead in the `exec`
11:46:02FromDiscord<Yardanico> and since you want it to handle all shell commands as well, you just pass the whole command as-is
11:47:47FromDiscord<Yardanico> also your code doesn't work with `nc` for me reliably, since `nc` doesn't seem to always send everything at once
11:48:55FromDiscord<4zv4l> this was the one I made in C↵but yeah since I used a buffer I wanted something that could work with any output length https://media.discordapp.net/attachments/371759389889003532/1025373674624274432/server.c
11:49:05FromDiscord<4zv4l> In reply to @Yardanico "and yeah, I kind": it's half deprecated ?
11:49:09*arkurious joined #nim
11:49:15FromDiscord<Yardanico> it's not officially deprecated, but its use has been kind of discouraged
11:49:34FromDiscord<Yardanico> using try: finally: is more preferred, at least to my knowledge
11:50:41FromDiscord<4zv4l> I'll try to remember that, thanks ^^
11:51:12FromDiscord<4zv4l> In reply to @Yardanico "I really hope you're": already did actually, but that was for school and harmless
11:59:49*ggsx quit (Quit: Client closed)
12:15:48FromDiscord<Horizon [She/Her]> Question, what usecase could transpiling Nim to Python or Nim to Lua, fill?
12:16:36FromDiscord<ShalokShalom> I honestly think this depends on how readable the code becomes
12:16:40FromDiscord<Horizon [She/Her]> (It's my goal after Nim to JVM)
12:17:02FromDiscord<ShalokShalom> F# just released / releases their transpiler to Python with Fable 4
12:17:08FromDiscord<ShalokShalom> It looks ok readable
12:17:15FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "I honestly think this": I mean, how readable could it be when I'm trying to make code nearly a 1:1
12:17:23FromDiscord<ShalokShalom> Lua is an interesting and popular target
12:17:32FromDiscord<Horizon [She/Her]> (It still requires a custom stdlib too)
12:17:36FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "Lua is an interesting": Oh?
12:17:41FromDiscord<ShalokShalom> You would be surprised, how many 'to-lua' languages exist
12:17:55FromDiscord<ShalokShalom> And Terra, which uses Lua as meta language
12:18:08FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "You would be surprised,": Oh yeah, i dislike them tbh
12:18:13FromDiscord<Horizon [She/Her]> Don't feel as clean as Nim
12:18:24FromDiscord<Horizon [She/Her]> Plus, i need to target Lua's 5.1 interpreter
12:18:52FromDiscord<Horizon [She/Her]> Since ComputerCraft and other games use Lua 5.1 for scripting
12:47:34FromDiscord<Horizon [She/Her]> Would Nim to Typescript be interesting? :P
12:50:20FromDiscord<Rika> In reply to @Event Horizon "Would Nim to Typescript": Not really no
12:50:30FromDiscord<Rika> Might be to some propel
12:50:30FromDiscord<Rika> People
12:51:51FromDiscord<Horizon [She/Her]> Hm
12:55:59FromDiscord<ShalokShalom> Everything is interesting
12:56:33FromDiscord<ShalokShalom> I still see the most value in a Nim to F# and Nim to Haxe
12:56:58FromDiscord<ShalokShalom> This targets the most languages
12:57:19FromDiscord<ShalokShalom> Since these languages compile to various other interesting languages
12:58:03FromDiscord<ShalokShalom> With these two targets, basically every language that is know to most programmers is available via Nim↵↵Including Rust
13:10:21*derpydoo joined #nim
13:13:33FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "I still see the": Oh?
13:13:52FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "With these two targets,": Haxe wouldn't allow near seamless interop tho
13:13:56FromDiscord<Horizon [She/Her]> Idk about F#
13:14:05NimEventerNew Nimble package! QRterm - A simple QR generator in your terminal., see https://github.com/aruZeta/QRterm
13:14:11FromDiscord<Horizon [She/Her]> Goal is to try and make it so interop is as clean as possible
13:15:43FromDiscord<k2> anybody who has used haxe knows how badly "compile to multiple languages with different semantics and type systems" works
13:16:28FromDiscord<auxym> In reply to @ShalokShalom "I still see the": why not nim directly to CLR bytecode, instead of f#?
13:17:07FromDiscord<k2> there are very few people in the haxe community who actually compile to different languages. most people generally have a preferred target and only make sure that everything works for them for that platform.
13:17:15FromDiscord<Horizon [She/Her]> In reply to @k2 "anybody who has used": Never used it tbh and i don't plan to
13:17:53FromDiscord<Horizon [She/Her]> I just want as much pure Nim code to work on another language, like the JVM (my main goal too)
13:18:14FromDiscord<Horizon [She/Her]> Would mean Nim truely runs everywhere lol
13:18:41FromDiscord<Horizon [She/Her]> One major obstacle for me though is wrapping Java code, that'll be hell
13:18:44FromDiscord<Rika> In reply to @k2 "there are very few": Guess what the situation is for Nim 😛
13:18:56FromDiscord<k2> also one big problem if you want to make nim work with different targets - there is lots of code which actually depends on c/c++ and even js target misses out on that stuff
13:19:37FromDiscord<jan Apisu> nim
13:20:18FromDiscord<k2> if there was less dependence on c/c++ libs, a wasm backend could be nicely done. but right now it is better to depend on llvm/emscripten/... like things to be able to compile such stuff with ease
13:20:48FromDiscord<jan Apisu> what code formatter you guys use for Nim?↵i need something like Black ( for python )
13:20:50FromDiscord<k2> same is the situation witch jvm/anything else
13:21:08FromDiscord<k2> no code formatter available for nim which works properly
13:21:31FromDiscord<jan Apisu> saddons
13:21:44FromDiscord<jan Apisu> or i can take that as a project idea
13:21:49FromDiscord<k2> (edit) "if there was less dependence on c/c++ libs, a wasm backend could be nicely done. but right now it is better to depend on llvm/emscripten/... like things to be able to compile such stuff with ease ... " added "(also they decided to use dwarf for wasm debuginfo so thats another reason to not have custom backend for wasm)"
13:22:20FromDiscord<k2> there is nimpretty (developed together in the nim repo) which you can work on if you want
13:22:41FromDiscord<k2> (edit) "witch" => "with"
13:27:13FromDiscord<jan Apisu> how can i run nimpretty in vscode
13:28:02FromDiscord<Rika> It’s a CLI program
13:29:14FromDiscord<hotdog> In reply to @jan Apisu "how can i run": You can probably set it up to run under a vscode task, so you can launch it from within the editor
13:30:23FromDiscord<Horizon [She/Her]> In reply to @k2 "also one big problem": Sadly yup
13:31:22FromDiscord<Horizon [She/Her]> In reply to @k2 "same is the situation": Yeah that's an issue but honestly, if pure Nim code works on X language, and i can interop with it (i consider that a big thing with Nim), that's fine
13:31:26FromDiscord<auxym> I think saem's extension is supposed to be able to run nimpretty, but I never got it to work
13:47:45*wallabra joined #nim
13:49:13FromDiscord<Yardanico> In reply to @auxym "I think saem's extension": nimpretty is broken in a lot of cases really, I don't think it's that useful in the current state
13:50:14FromDiscord<auxym> yeah, that's why I haven't invested too much effort in trying to get it to work
13:57:56FromDiscord<ShalokShalom> In reply to @Event Horizon "Yeah that's an issue": Do you translate from the AST, the source language or something else?
13:58:07FromDiscord<ShalokShalom> If there is even some intermediate languages in Nim
13:58:24FromDiscord<ShalokShalom> The jvm port
13:59:37FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "Do you translate from": I'm translating from the Nim AST and generating JVM bytecode (with Jasmin, a bytecode assembler for Java)
13:59:48FromDiscord<ShalokShalom> In reply to @k2 "if there was less": Well, there is the custom, direct llvm backend
14:00:14FromDiscord<Horizon [She/Her]> If you look at https://github.com/Mythical-Forest-Collective/Nimpiler, the addition test works, except it doesn't actually do addition since semPass makes it a string lmao
14:00:34FromDiscord<Horizon [She/Her]> It's just emitting hello world statements and works perfectly fine, i just really need to rework the code to be a lot better
14:01:31FromDiscord<ShalokShalom> sent a long message, see https://paste.rs/Xy7
14:02:02FromDiscord<ShalokShalom> I personally care only about F# and Fable works on F# ↵↵So PHP, Rust, Dart and Python are covered by that
14:02:05FromDiscord<Horizon [She/Her]> It's definitely possible to make a CLR bytecode backend but I don't use CLR so I'm not focusing on that at all
14:02:09FromDiscord<ShalokShalom> And JavaScript, obviously
14:02:26FromDiscord<Horizon [She/Her]> (C# or any other .NET language)
14:02:26FromDiscord<ShalokShalom> In reply to @Event Horizon "It's definitely possible to": CLR and Java Bytecode is very similar
14:02:39FromDiscord<ShalokShalom> CIL/Java Bytecode
14:02:45FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "CLR and Java Bytecode": I'm using an assembler, not the direct bytecode
14:03:03FromDiscord<Horizon [She/Her]> Unless you want to port Jasmin (the JVM bytecode assembler) to C# lmao
14:08:35FromDiscord<ravinder387> In reply to @Event Horizon "I'm using an assembler,": I will pay. if u teach me how nim ast translate into other lang
14:09:28FromDiscord<Horizon [She/Her]> In reply to @ravinder387 "I will pay. if": Lmao it's a uh, lot of work and ngl i don't even understand a lot of it
14:10:18FromDiscord<ravinder387> you are not expert
14:11:03FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "If you look at": You can look at my repo here in the https://github.com/Mythical-Forest-Collective/Nimpiler/blob/master/src/backends/jvm/jasmin/compile.nim file? Note that I'm using a fork of Nim that makes the compiler easier to work with and it's adding more improvements too still
14:11:33FromDiscord<Horizon [She/Her]> In reply to @ravinder387 "you are not expert": Yeah I'm just hacking together code with my own stuff and filing down things that are unneeded or that could be neater
14:12:58FromDiscord<Yardanico> In reply to @Event Horizon "I'm translating from the": but isn't jasmin basically abandoned?
14:13:04FromDiscord<Yardanico> there seems to be no development at all for multiple years
14:14:03FromDiscord<Horizon [She/Her]> In reply to @Yardanico "but isn't jasmin basically": It is, but it's the easiest thing for me to use
14:14:26FromDiscord<Yardanico> it's just that I think it's highly probable that jasmin itself has bugs
14:14:29FromDiscord<Yardanico> and it's not updated for recent jvm
14:14:43FromDiscord<Horizon [She/Her]> If i ever can get the energy to do it, i may work on my own assembler or bytecode generation library for Nim
14:14:55FromDiscord<Horizon [She/Her]> In reply to @Yardanico "and it's not updated": The JVM is backwards compatible which in this case, works for me
14:15:11FromDiscord<Horizon [She/Her]> In reply to @Yardanico "it's just that I": It probably does but doesn't impact me currently so
14:17:53FromDiscord<Horizon [She/Her]> Also, there's no alternative that i know of that i could use
14:18:09FromDiscord<Yardanico> you can just emit jvm bytecode directly?
14:18:12FromDiscord<Yardanico> since it's backwards compatible
14:18:55FromDiscord<Horizon [She/Her]> In reply to @Yardanico "you can just emit": I can yeah, but I don't understand it at all and it's easier to debug a human readable format than the bytes, even with javap
14:19:51FromDiscord<Horizon [She/Her]> I'm not intending on Jasmin being the final implementation for the JVM backend, but this definitely will help me get a bit more familiar with how the bytecode works at a lower level and help me make valid code easier
14:22:41*derpydoo quit (Ping timeout: 260 seconds)
14:24:50FromDiscord<ShalokShalom> In reply to @Event Horizon "You can look at": You mean Cyo?
14:24:58FromDiscord<Horizon [She/Her]> Yup
14:25:04FromDiscord<ShalokShalom> I didn't thought it's already doing some difference
14:25:14FromDiscord<ShalokShalom> Where do you notice it the most?
14:26:30FromDiscord<Horizon [She/Her]> They've reorganised the packages, they've implemented a VM backend for Nimscript which my code is mostly based off of, they're also made the compiler quite a bit faster
14:26:32FromDiscord<ShalokShalom> So, translating bytecode doesn't necessarily translate into readable source code
14:27:05FromDiscord<ShalokShalom> Wasnt there a VM for Nimscript already?
14:27:35FromDiscord<Horizon [She/Her]> Wdym? I'm not using Nimskull VM's bytecode and Jasmin is an assembler which while isn't readable, is easy to understand with some poking
14:27:50FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "Wasnt there a VM": Yeah, that's the vm I'm talking about
14:28:03FromDiscord<Horizon [She/Her]> I'm using vmgen.nim as the base for my backend
14:30:05*derpydoo joined #nim
14:46:28*kenran quit (Remote host closed the connection)
14:49:31FromDiscord<auxym> what's up with nimbase.h? Is it distributed with (binary) nim installations? Or only used when building the nim compiler? Search on my pc doesn't turn up
14:52:00FromDiscord<Rika> Distributed with installations, you need it to build any Nim application
14:53:44FromDiscord<auxym> oh. didn't turn up in my searches because ".choosenim" is considered hidden
15:02:13*vicecea quit (Remote host closed the connection)
15:02:44*vicecea joined #nim
15:10:20FromDiscord<ShalokShalom> In reply to @Event Horizon "Yeah, that's the vm": I mean, is there not a Nimscript VM done by Nim
15:10:36FromDiscord<ShalokShalom> I thought that's how Nimscript gets executed
15:15:52FromDiscord<auxym> yes? when you run `nim e`. it's also embedded in the compiler and used to evaluate macros/templates and compile-time expressions (const etc)
15:23:27FromDiscord<ShalokShalom> In reply to @Event Horizon "They've reorganised the packages,": So how is the Nimskull implementation better?
15:53:12*kenran joined #nim
16:02:50FromDiscord<konradmb> Is there a safe seq/array accessor that produces default type value on out of bounds access?
16:03:04FromDiscord<konradmb> like with options.get
16:12:15FromDiscord<jan Apisu> can we generate css files using nim?
16:12:50FromDiscord<enthus1ast> there is an scss wrapper
16:13:09FromDiscord<jan Apisu> can we make a gnome app in nim?
16:13:28FromDiscord<jan Apisu> with libadwaita and stuff
16:13:32FromDiscord<enthus1ast> gnome idk, but gtk
16:13:43FromDiscord<jan Apisu> gtk3?
16:15:21FromDiscord<enthus1ast> https://github.com/StefanSalewski/gintro
16:17:43FromDiscord<Prestige> In reply to @konradmb "Is there a safe": Not that I'm aware of but you could write a proc to do that I suppose
16:50:38FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "So how is the": I haven't looked into the internals too much by myself so you're better off asking them, but iirc they have a graph of all the changes they've made, and just reading the code and comparing it with Nim will show many differences
16:51:21FromDiscord<Horizon [She/Her]> In reply to @ShalokShalom "I mean, is there": Nimskull's Nimscript has it's own bytecode format and has better integration with things like the `os` module iirc, i haven't touched it though since i haven't needed to
16:55:10FromDiscord<Recruit_main707> In reply to @konradmb "Is there a safe": You could create your own `SafeArray` type and then create a `[]` function to do what you want
17:02:51FromDiscord<jan Apisu> is there a parsing library?
17:04:19FromDiscord<Bung> parse what
17:04:22FromDiscord<Recruit_main707> yeah but i dont know the name
17:08:12*pro joined #nim
17:13:19FromDiscord<ShalokShalom> In reply to @Event Horizon "Nimskull's Nimscript has it's": And what part of the fork does actually effect you positively?
17:14:03FromDiscord<Horizon [She/Her]> The support i get there, the structure of the packages is clearer when searching the docs (for example, ast types are in their own file)
17:15:03FromDiscord<Horizon [She/Her]> And it's more readable than the Nim compiler code in mainstream Nim, which means if i want to look at how a backend works, it's so much easier for me (because i struggle a lot when it comes to reading messy code), and Nim itself says that the compiler code isn't a poster child of good code
17:15:41FromDiscord<Horizon [She/Her]> @ShalokShalom here
17:16:01FromDiscord<Horizon [She/Her]> Also, you're genuinely better off asking them for everything they've done, they can give a much better and more in-depth explanation
17:16:03FromDiscord<ShalokShalom> I see
17:16:35FromDiscord<ShalokShalom> Sounds good
17:20:46FromDiscord<Mrcool> Will nim get anonymous struct support in the future, it something that I enjoy a lot in typescript it feels very natural to use instead of having to name each type, zig also seems to have it <https://ziglang.org/documentation/0.9.1/#Anonymous-Struct-Literals> (never used zig though)
17:23:06FromDiscord<alehander42> there are tuples
17:23:30FromDiscord<alehander42> they wouldn't match with named types with the same fields tho, so maybe that's different(?)
17:24:03FromDiscord<alehander42> there are tuples with named fields, not only the `(a,b)` ones
17:24:45*kenran quit (Remote host closed the connection)
17:43:11FromDiscord<Mrcool> Yeah the most important part is that they match, I think it's called structural typing
17:52:20FromDiscord<Mrcool> This issue <https://github.com/nim-lang/Nim/issues/20440> is annoying me since I can't use the lsp when targeting js backend, can I get some hints on where I need to look to fix this
18:07:18FromDiscord<hotdog> @Mrcool try asking in #internals too
18:07:51FromDiscord<hotdog> I'm also interested in what's going on but I've not got experience with the compiler internals/nimsuggest impl
18:19:23FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4bVy
18:19:41FromDiscord<ShalokShalom> So because it has a type, its not optional anymore?↵↵https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption]
18:20:33FromDiscord<ShalokShalom> (edit) "long message," => "code paste," | "http://ix.io/4bVy" => "https://play.nim-lang.org/#ix=4bVA"
18:21:07FromDiscord<ShalokShalom> (edit) "anymore?↵↵https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption]" => "anymore?↵https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption]"
18:27:35FromDiscord<Rika> In reply to @ShalokShalom "I am a little": the error is that you are not using the return value
18:27:45FromDiscord<Rika> i do not know what you mean by "because it has a type, its not optional anymore?"
18:27:59FromDiscord<ShalokShalom> Its what the error suggested me
18:28:06FromDiscord<ShalokShalom> "{poStdErrToStdOut})' is of type 'Process' and has to be used (or discarded)"
18:28:11FromDiscord<Rika> no
18:28:16FromDiscord<Rika> "expression 'startProcess("bash nspawn --init garuda/garuda/raw", "", [], nil,↵ {poStdErrToStdOut})' is of type 'Process' and has to be used (or discarded)"
18:28:27FromDiscord<Rika> "expression 'startProcess(...)' is of type 'Process' and has to be used (or discarded)"
18:28:35FromDiscord<ShalokShalom> aha
18:28:45FromDiscord<Rika> strange line break
18:28:50FromDiscord<Rika> dont ask me why thats there lol
18:28:50FromDiscord<ShalokShalom> yeah
18:29:07FromDiscord<ShalokShalom> errors are not the strongest suit of Nim 😛
18:29:16FromDiscord<Rika> eh you get used to it
18:29:20FromDiscord<Rika> not great but whatever
18:29:47FromDiscord<ShalokShalom> So startProcess forces me to handle the return value
18:30:04FromDiscord<ShalokShalom> Since its meant to interact, not just send a simple command
18:36:09FromDiscord<ShalokShalom> So, what I am doing wrong now?
18:36:17FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/1025476191009914911/Screenshot_18.png
18:38:21FromDiscord<ShalokShalom> I am expecting to see "true" echoed in the Terminal. Is the code wrong?
18:44:06FromDiscord<Mrcool> ~ doesn't get expanded magically
18:51:53*pro quit (Quit: pro)
18:52:08FromDiscord<Rika> In reply to @ShalokShalom "So startProcess forces me": Nim in general does that
18:52:44FromDiscord<Rika> In reply to @Mrcool "~ doesn't get expanded": This is likely the issue yeah
18:56:32FromDiscord<ShalokShalom> I dont understand
18:56:36FromDiscord<ShalokShalom> What can I do?
18:56:41FromDiscord<ShalokShalom> In any of the two issues 😦
19:09:46FromDiscord<enthus1ast> in nim you must capture the return value, or explicitly discard it
19:10:13FromDiscord<enthus1ast> and the second issue
19:10:24FromDiscord<enthus1ast> is that the path is not expanded
19:11:09FromDiscord<enthus1ast> try this\: https://nim-lang.org/docs/os.html#expandTilde%2Cstring
19:12:36*CyberTailor joined #nim
19:17:08FromDiscord<ShalokShalom> sent a code paste, see https://play.nim-lang.org/#ix=4bVN
19:17:20FromDiscord<ShalokShalom> (edit)
19:17:26FromDiscord<ShalokShalom> this doesnt work :/
19:17:50FromDiscord<ShalokShalom> In reply to @enthus1ast "in nim you must": I plan to capture it, and I miss any info about how to do that
19:18:02FromDiscord<ShalokShalom> There is nothing about that in the startProcess documentation
19:18:02FromDiscord<juan_carlos> Nim supports NUMA arch?
19:18:10FromDiscord<ShalokShalom> Like, no example or anything
19:18:33FromDiscord<ShalokShalom> In reply to @juan_carlos "Nim supports NUMA arch?": Nim supports each platform that its targets do, I assume
19:18:41FromDiscord<ShalokShalom> Does C, C++ support NUMA?
19:18:53FromDiscord<ShalokShalom> If that is a CPU architecture, you are asking for
19:24:32FromDiscord<enthus1ast> @ShalokShalom\: for me it works (also on windows)
19:24:47FromDiscord<enthus1ast> let pr = startProcess(........)
19:25:00FromDiscord<ShalokShalom> oh, thanks a lot
19:25:05FromDiscord<ShalokShalom> so its just me ^^
19:25:08FromDiscord<ShalokShalom> Linux
19:26:20FromDiscord<ShalokShalom> Ah, you mean just putting startProcess into a binding
19:27:01FromDiscord<enthus1ast> startProcess returns something, just assign it to a variable or use discard
19:27:01FromDiscord<enthus1ast> discard startProcess
19:31:15*krux02 joined #nim
19:38:27FromDiscord<ShalokShalom> How would I then interact with an appearing yes/no question, that happens within the process?
19:39:03FromDiscord<enthus1ast> you could try to get handles to the stdout and parse this
19:39:32FromDiscord<enthus1ast> but i'm unshure if you can peek on the output stream, so this might become tricky
19:40:07FromDiscord<ShalokShalom> Is there no standardized way to do this?
19:41:44*CyberTailor left #nim (Konversation terminated!)
19:45:13FromDiscord<enthus1ast> this works\:
19:45:28FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4bVR
19:45:36FromDiscord<enthus1ast> host.nim
19:45:46FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4bVS
19:54:47FromDiscord<ShalokShalom> thanks a lot
20:10:59FromDiscord<Horizon [She/Her]> If i wanted to be able to make it so a proc takes a type (so int, string, etc) what would i do for it?↵I need to map primitive Nim types to their Java counterpart but i want it to be in a simple way if possible?
20:11:11FromDiscord<Horizon [She/Her]> Or am i better off just using separate methods?
20:11:59*oprypin quit (Quit: No Ping reply in 180 seconds.)
20:12:45FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4bVZ
20:13:05FromDiscord<Horizon [She/Her]> Oh neat, didn't know that
20:13:28FromDiscord<enthus1ast> idk, maybe yes. Think it depends on the usescase↵(@Horizon [She/Her])
20:13:56FromDiscord<Horizon [She/Her]> In reply to @enthus1ast "idk, maybe yes. Think": My case is above xD
20:15:03*oprypin joined #nim
20:15:09FromDiscord<Patitotective> sent a code paste, see https://paste.rs/6Qs
20:15:22FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4bW2" => "https://play.nim-lang.org/#ix=4bW1"
20:16:00FromDiscord<enthus1ast> afaik you cannot exportc such generic procs and call them from eg c or java ffi?
20:16:23FromDiscord<Patitotective> In reply to @enthus1ast "afaik you cannot exportc": dont know
20:17:07FromDiscord<enthus1ast> then @Horizon [She/Her] needs to make multiple procs
20:17:07FromDiscord<Horizon [She/Her]> In reply to @enthus1ast "afaik you cannot exportc": Not using FFI, i'm making a code generator for assembly :p
20:17:16FromDiscord<enthus1ast> ah ok
20:17:30*kenran joined #nim
20:18:43FromDiscord<Horizon [She/Her]> Not assembly, but a bytecode assembler
20:18:47FromDiscord<enthus1ast> sounds interesting btw↵(@Horizon [She/Her])
20:19:15FromDiscord<enthus1ast> so you wanna directly output opcodes?
20:19:28*kenran quit (Remote host closed the connection)
20:19:39FromDiscord<Horizon [She/Her]> In reply to @enthus1ast "so you wanna directly": I'm gonna work my way up to that haha, currently i'm using Jasmin
20:19:48FromDiscord<Horizon [She/Her]> old, probably fragile, but works fine
20:19:53FromDiscord<enthus1ast> jasmin?
20:20:13FromDiscord<enthus1ast> ahh jvm opcodes
20:20:19FromDiscord<Horizon [She/Her]> yeah hold on
20:20:20FromDiscord<Horizon [She/Her]> https://jasmin.sourceforge.net/guide.html
20:21:27FromDiscord<Horizon [She/Her]> It's for my impl of a JVM Nim backend
20:22:58FromDiscord<enthus1ast> i dont know much about java and jvm, but would it not be better if you would generate java sourcecode?
20:22:59FromDiscord<enthus1ast> So that one could importc and exportc stuff
20:23:27FromDiscord<enthus1ast> (but still nice hacky project \:) )
20:24:18FromDiscord<Horizon [She/Her]> In reply to @enthus1ast "i dont know much": I've had people tell me that i should use bytecode when i was working on source code creating, and then source code when i am using bytecode now lmao
20:24:37FromDiscord<Horizon [She/Her]> But in general, lower level code generation should theoretically be easier
20:24:52FromDiscord<enthus1ast> do not listen to me, i have no clue \:P
20:26:15FromDiscord<Horizon [She/Her]> Fair lmao it's totally fresh
20:26:19FromDiscord<Horizon [She/Her]> Uh ignore that
20:26:51*kenran joined #nim
20:28:47*kenran quit (Read error: Connection reset by peer)
20:30:05*kenran joined #nim
20:30:15FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Fair lmao it's totally": Turns out juggling a convo when impersonating the early 80/90s(?) isn't a good idea when doing dev work
20:51:13FromDiscord<Phil> Is it possible to basically pass on a seq of types?
20:51:38*fallback quit (Ping timeout: 268 seconds)
20:51:46*rwb quit (Ping timeout: 260 seconds)
20:53:32FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4bWb
20:53:56FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4bWb" => "https://play.nim-lang.org/#ix=4bWd"
20:54:57FromDiscord<Patitotective> i dont think you can, youll have to use an object variant but youd have to make a variant for each typedesc and that doesnt make sense to me :/
20:56:37FromDiscord<Phil> What I basically want, is I want the user to define their norm models for whatever they want, and then I want them to pass me all their norm-model-types.↵I generate a crapton of CRUD endpoints for them and add them to their application, which I can because I'll be assuming the web project and ORM they use
20:57:16*rwb joined #nim
20:57:54FromDiscord<Phil> So object variants are out because I can not know all the model types. My code will be able to grab them at compile time, but I do not specifically know them since they can be anything the user of the lib defines
21:00:58*fallback joined #nim
21:04:54FromDiscord<hotdog> In reply to @Isofruit "So object variants are": Can't think of a way to do this without macros as I guess you need access to all the object fields to generate the crud code
21:06:43*qwr quit (Ping timeout: 246 seconds)
21:07:04FromDiscord<Phil> For now I'll just write a proc that does this for a single type, can figure out how to call that for n types later
21:08:16FromDiscord<hotdog> In reply to @Isofruit "For now I'll just": Good plan. It shouldn't be a difficult macro to write
21:13:32*qwr joined #nim
21:24:44*rwb is now known as rb
21:32:41*kenran quit (Remote host closed the connection)
21:46:38FromDiscord<Elegantbeef> `proc doThing[T: A](val: T)`↵(@Phil)
21:58:19*krux02 quit (Remote host closed the connection)
22:29:05*derpydoo quit (Quit: derpydoo)
22:40:33FromDiscord<ngangngong> hi there, anyhow I can inject rawhtml in https://nim-lang.github.io/Nim/htmlgen.html#examples ?
22:52:13*oprypin quit (Quit: Bye)
22:52:23*oprypin joined #nim
23:21:15*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)