<< 12-02-2024 >>

00:46:31FromDiscord<sirius_3x> does anyone here know how to set up a GlArea in owlkettle (nim wrapper for GTK) and maybe could post/link an example? the repo doesnt seem to feature any examples using it
00:48:02FromDiscord<sirius_3x> (edit) "wrapper" => "bindings"
00:48:10FromDiscord<MDuardo> Ask on Owlkettle discussion section on GitHub?↵https://github.com/can-lehmann/owlkettle/discussions↵(@sirius_3x)
00:48:29FromDiscord<MDuardo> I would like to help but I have barely use Owlkettle
00:48:39FromDiscord<sirius_3x> oh i guess i could just do that lol
00:49:05FromDiscord<sirius_3x> In reply to @MDuardo "I would like to": no worries, ty for pointing me in the right direction
00:50:55FromDiscord<MDuardo> 🫡
00:52:15FromDiscord<luna4> In reply to @chronos.vitaqua "The license is called": I will be the first licenseless software engineer
00:57:40FromDiscord<luna4> Neh not really, but sounds cool
01:01:12*Mister_Magister quit (Quit: bye)
01:03:34*Goodbye_Vincent quit (Quit: Ping timeout (120 seconds))
01:05:05*Mister_Magister joined #nim
01:07:10*Goodbye_Vincent joined #nim
01:15:31FromDiscord<leorize> a professional license is not the same as a degree
01:15:44FromDiscord<leorize> it's actually nice that we don't require a license, I think
01:21:09FromDiscord<luna4> Yes, i was joking, i should have wrote /j
01:21:42FromDiscord<luna4> In fact 30% of software engineers are self thought
01:23:48FromDiscord<Elegantbeef> I mean depending on your province you do 😄
01:24:10FromDiscord<luna4> Wait actually?
01:24:29FromDiscord<Elegantbeef> But the issue is non existent though if you did, not all programmers need to be a software engineer, just like not all hardware tinkers need to be an engineer
01:25:01FromDiscord<Elegantbeef> Yes in Canada depending on province it's illegal to call yourself a "software engineer" cause engineering is a proper licensed discipline with assumptions about what they do
01:25:11*krux02 quit (Remote host closed the connection)
01:25:21FromDiscord<leorize> who even governs the licensing portion of that lol
01:25:29FromDiscord<Elegantbeef> The provincial engineer board
01:25:36FromDiscord<luna4> In reply to @Elegantbeef "Yes in Canada depending": I didnt know that, seems a bit weird
01:25:38FromDiscord<leorize> fun
01:25:58FromDiscord<Elegantbeef> It's an oversight committee to ensure engineering is adhered to ensure safety and a track back when negligence happens
01:26:09FromDiscord<Elegantbeef> You don't want your bridge builder to be a self appointed engineer
01:26:25FromDiscord<Elegantbeef> But it's fine if your cancer radiation therapy is apparently(therac-25)
01:26:57FromDiscord<luna4> In reply to @Elegantbeef "It's an oversight committee": I dont think calling yourself a software engineer will cause any issue if its not critical infrastructure
01:27:15FromDiscord<luna4> Its innecessary gatekeeping imo
01:27:25FromDiscord<luna4> (edit) "innecessary" => "unnecessary"
01:28:31FromDiscord<Elegantbeef> The issue is it conflates the role for something it is not
01:28:32FromDiscord<Elegantbeef> Eh engineer is a standard term for many aspects outside of software but in software it's a weirdly open place
01:28:32FromDiscord<leorize> if they're gonna add one for software they'd have to specialize it into subsections
01:28:57FromDiscord<leorize> though I think rn there aren't any universally accepted organization wrt computer science
01:29:23FromDiscord<Elegantbeef> Well the provincial p.eng boards do specific Canadian universities
01:29:38FromDiscord<leorize> ACM is making headways into universities, though
01:29:49FromDiscord<Elegantbeef> I do think proper SE is important, which is why I think the distinction matters
01:30:21FromDiscord<Elegantbeef> Therac 25 is a prime case of what happens when you do not adhere to any safety protocol
01:30:45FromDiscord<luna4> In reply to @Elegantbeef "I do think proper": If it was based in skills and not titles i would see it as important too
01:30:59FromDiscord<Elegantbeef> Turns out a single programmer should not be all there is in between killing people and not killing people
01:31:03FromDiscord<luna4> You need money to get titles
01:31:11FromDiscord<Elegantbeef> Hell we do not even know who the programmer was that programmed therac25
01:31:32FromDiscord<leorize> well if you're working on safety critical systems, I'd prefer that you have a title or two
01:31:45FromDiscord<Elegantbeef> Exactly
01:31:49FromDiscord<luna4> In reply to @Elegantbeef "Hell we do not": The problem was that it was undocumented and there was only one hardward fail safe
01:31:56FromDiscord<Elegantbeef> Engineers should be required for any safety critical systems
01:31:57FromDiscord<luna4> (edit) "hardward" => "hardware"
01:32:12FromDiscord<Elegantbeef> The problem is it was untested code that did not follow any standard engineering principles
01:32:29FromDiscord<luna4> In reply to @leorize "well if you're working": That eliminates a lot of people that dont have the money
01:32:39FromDiscord<luna4> But have the skills
01:32:44FromDiscord<Elegantbeef> It was tested only in situ and never had automated tests
01:32:49FromDiscord<Elegantbeef> I think you mis understand luna
01:32:57FromDiscord<Elegantbeef> I'm not saying people should not be allowed to program
01:33:18FromDiscord<Elegantbeef> I'm saying that safety crticial applications of programming should require a qualified software engineer in the scope that the software requires
01:33:30FromDiscord<Elegantbeef> Just like a bridge requires an engineer's stamp
01:34:10FromDiscord<luna4> Im saying that gatekeeping a job based on a title is stupid, if you had to take a test before taking a job in critical things that would be good
01:34:14FromDiscord<Elegantbeef> It sucks that post secondary is a formalisation that is required for that, but it's better than the alternative of "Hey he can program get him to do the cancer machine"
01:34:30FromDiscord<Elegantbeef> No I don't think "Software engineer" is a job title, it's a personal title
01:35:12FromDiscord<luna4> I meant a degree, im not good at english sorry
01:35:20FromDiscord<leorize> this is the distinction of professional and regulated professional
01:35:25FromDiscord<Elegantbeef> Exactly
01:35:40FromDiscord<Elegantbeef> In places that it matters it should be regulated as such "Software engineer" should only apply to P.eng and equivlents
01:35:44FromDiscord<Elegantbeef> YMMV
01:36:40FromDiscord<luna4> There should be a free of charge exam to prove that you have skills that are similar to a degree
01:37:10FromDiscord<leorize> regulated professions are very strict, where you must\: prove that you keep up with the times, adhere to very strict code of conduct and standards, and you will be regularly tested by the regulation body
01:37:27FromDiscord<leorize> you want that for safety critical stuff, at least
01:37:34FromDiscord<luna4> You dont need a degree to prove that
01:38:48FromDiscord<leorize> I didn't say anything about degree fwiw
01:39:19FromDiscord<luna4> Im not getting anything
01:39:34FromDiscord<leorize> I'd love that ngl↵(@luna4)
01:39:36FromDiscord<Elegantbeef> I mean I do not disagree it should be more accesible, but as a general usage of the term "engineer" is stupid
01:39:48FromDiscord<leorize> although I can see the argument for not having that
01:40:27FromDiscord<luna4> In reply to @leorize "I'd love that ngl": It would make things much easier
01:40:33FromDiscord<Elegantbeef> I've dug a hole but cannot legally call myself a "Civil Engineer" , why is it that I work with computers so can call myself a "Software Engineer" 😛
01:41:22FromDiscord<leorize> I think if they ever made this regulated, it won't be called SE
01:41:30FromDiscord<Elegantbeef> Yea I think as long as there is a standardisation of what is expected and strict adherence is ensured it's fine
01:41:35FromDiscord<Elegantbeef> I mean in many provinces leo it's 😛
01:42:05FromDiscord<Elegantbeef> BC and Ontario both have P.eng software engineers and it's against the law to use the term anywhere if you're not certified
01:42:22FromDiscord<luna4> In reply to @Elegantbeef "I've dug a hole": People who call themselves that need to prove it to land a job, people who call themselves software engineers and they only know to print hello world are just stupid
01:42:26FromDiscord<leorize> luckily I call myself a professional dumbass
01:42:44FromDiscord<Elegantbeef> The issue is that "Software Engineer" was allowed to grow into what it's not
01:42:57FromDiscord<Elegantbeef> It should be "Software Programmer"
01:43:22FromDiscord<Elegantbeef> The only reason "Engineer" is coveted is cause it's the term people use when they've "made it"
01:43:35FromDiscord<leorize> I tend to see people calling themselves programmers
01:43:50FromDiscord<luna4> Programming an engineering are very different, programming is just coding without building nothing engineers build anything but they rarely code
01:43:56FromDiscord<luna4> (edit) "an" => "and"
01:44:09FromDiscord<luna4> In reply to @leorize "I tend to see": Same
02:06:44FromDiscord<girvo> Does `asyncnet` have timeouts in recvInto/et al that I'm not seeing?
02:07:32FromDiscord<Elegantbeef> Don't imagine, it being async I guess would imply you do not care about that 😄
02:08:46FromDiscord<girvo> In reply to @Elegantbeef "Don't imagine, it being": Dunno, I guess? Going back to async after being in mutlithreaded land is breaking my brain today
02:09:11FromDiscord<girvo> I guess I can always `withTimeout` on the future?
02:09:34FromDiscord<Elegantbeef> Maybe but that sounds like it'll be cycle galore
02:09:54FromDiscord<Elegantbeef> Ah nvm that's not a callback
02:09:57FromDiscord<leorize> you can but asyncdispatch can't do cancellation
02:10:03FromDiscord<girvo> In reply to @leorize "you can but asyncdispatch": Oh goody
02:10:03FromDiscord<leorize> so use something else like chronos
02:10:10FromDiscord<girvo> In reply to @leorize "so use something else": Yeah fair enough
02:10:39FromDiscord<Elegantbeef> Soon leo will advertise nim-sys 😛
02:11:36FromDiscord<leorize> maybe in a few months \:p
02:24:53*lucasta quit (Quit: Leaving)
04:35:19FromDiscord<girvo> Ohhhhh std/os (and more it seems?) but with proper destructors and proper modern Nim approachs to things? this is very relevant to my interests haha
04:40:33FromDiscord<Elegantbeef> What a world huh
04:45:33FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=uimmvFKrkbFs
04:46:26FromDiscord<Elegantbeef> My view is that running the smallest component as possible seperately is best
04:46:52FromDiscord<girvo> Having to deploy 5 binaries + systemd unit files is such a pain 🥲
04:47:25FromDiscord<Elegantbeef> Well if these are all intro dependent and have to all be started by the init system you lose some benefits
04:47:46FromDiscord<Elegantbeef> Not crashing the entire program when a unit crashes is pretty good no?
04:48:00FromDiscord<Elegantbeef> Don't let my numpty view sway you any which way
04:48:20FromDiscord<girvo> But we're hitting some deeply weird errors/crashes with our threadpool version currently. `Bad file descriptor [OSError]` on socket.accept, from what it looks like, as well as just random crashes altogether
04:48:52FromDiscord<girvo> In reply to @Elegantbeef "Well if these are": thing is they don't actually share anything. I'm more grumbling about having to generate 4, 5-ish binaries and unit files and such lol. Its not _that_ big a deal
04:49:13FromDiscord<girvo> Ages ago they did "share" some communication via channels, but now that's been moved to Redis
04:49:16FromDiscord<Elegantbeef> Ah if they are unrelated then surely it's just best to have them be independent programs
04:49:27FromDiscord<Elegantbeef> Unix should piss down upon you otherwise
04:50:08FromDiscord<girvo> yeah yeah I know lol
04:50:55FromDiscord<girvo> just now its 6 nimble projects (5 for each entry point, plus one shared library for the shared code across each)
04:51:20FromDiscord<girvo> But I know that combining threadpool + asyncdispatch (or chronos, I guess?) is a recipe for weird bugs and pain
04:52:09FromDiscord<girvo> Maybe I'll just `when isMainModule:` setup entry points for the other binaries too and nim c 'em shrugs saves setting up other projects and such?
04:55:45FromDiscord<Elegantbeef> Seems fine to me
04:59:50FromDiscord<bung8954> how to solve this when use https://github.com/guzba/nimsimd " error: "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard""
05:00:21FromDiscord<bung8954> I tried put these flags but didn't work out
05:00:31FromDiscord<Elegantbeef> did you try `--passC` and `--passL` with those?
05:01:52FromDiscord<bung8954> yeah, full command `nim c -d:release --cpu:arm64 --passC:-march=native --passC:-mfloat-abi=hard --passL:-mfloat-abi=hard --passC:-mfpu=neon src/initium.nim`
05:02:38FromDiscord<odexine> is this cross compiling?
05:02:45FromDiscord<bung8954> it looks I shouldn't use neon ?
05:02:53FromDiscord<bung8954> no, am on m1 MBP
05:03:03FromDiscord<odexine> NEON is the equivalent of AVX iirc
05:03:05FromDiscord<odexine> or was it SSE
05:03:13FromDiscord<Elegantbeef> Are you using arm Nim?
05:03:41FromDiscord<bung8954> I use nim download through choosenim
05:04:05FromDiscord<Elegantbeef> That's x86
05:04:46FromDiscord<bung8954> but why the error point to nimsimd, if nim binary related
05:05:37FromDiscord<Elegantbeef> I mean I'm just suggesting you use the proper compiler for your CPU
05:05:44FromDiscord<Elegantbeef> To remove a possible mismatch
05:06:59FromDiscord<bung8954> Possibly , now it point to std/paths
06:09:26*Jjp137 joined #nim
06:38:37FromDiscord<guzba8> @bung8954 i include `--cpu:arm64 --passL:"-arch arm64" --passC:"-arch arm64"` when compiling on m1 and that works for me
06:40:10FromDiscord<guzba8> full example command `nim c --cpu:arm64 --passL:"-arch arm64" --passC:"-arch arm64" -rf folder/file.nim`
06:40:55FromDiscord<guzba8> this works with amd64 compiler since compiler being amd64 does not matter
06:46:31*advesperacit joined #nim
06:54:42*xet7 quit (Remote host closed the connection)
06:57:01*xet7 joined #nim
07:13:44FromDiscord<bung8954> In reply to @guzba8 "<@714152700920594493> i include `--cpu:arm64": cool, works for me, Thank you!
07:26:37*PMunch joined #nim
08:12:52FromDiscord<mratsim> In reply to @odexine "NEON is the equivalent": "vector processing unit" which SSE/AVX and Neon instructions are executed on.
08:12:59FromDiscord<nnsee> what's the go-to way of compiling nim to wasm these days? any example template projects?
08:13:25FromDiscord<Elegantbeef> wasi or emcc
08:13:29FromDiscord<Elegantbeef> wasi-sdk\ 😄
08:13:35FromDiscord<mratsim> In reply to @nnsee "what's the go-to way": through emscripten, and if you don't have C dependencies, maybe you can use nlvm.
08:13:56FromDiscord<Elegantbeef> C deps and don't need WASI
08:14:48FromDiscord<nnsee> I won't be needing either of those tbh
08:15:18FromDiscord<nnsee> making an emulator for a tiny made-up CPU/instruction set for a colleague's course on exploiting memory vulnerabilities
08:15:52FromDiscord<nnsee> it really does not have to be wasm at all but i'm using it as an excuse to dabble in it
08:17:14FromDiscord<odexine> In reply to @mratsim ""vector processing unit" which": Good to know the technical wording, thank you
08:22:01FromDiscord<nnsee> tbh maybe i should use this as an excuse to do rust as well
08:22:14FromDiscord<nnsee> rust seems to have pretty good first class support for compiling to wasm
08:23:06FromDiscord<nnsee> and, love it or hate it, it seems like rust is only gaining popularity and probably worth knowing in the long run
08:30:22NimEventerNew thread by chernov: Set JS as backend for nimsuggest/nimlangserver, see https://forum.nim-lang.org/t/10980
08:37:47FromDiscord<Robyn [She/Her]> In reply to @nnsee "what's the go-to way": Emcc is the only way with Nim 2.0.0+ currently, unless that patch to remove setjmp.h's usage during `--exceptions:goto` has been merged yet
08:38:15FromDiscord<Robyn [She/Her]> In reply to @nnsee "rust seems to have": That's because it uses LLVM :P
08:42:01*xutaxkamay quit (Ping timeout: 255 seconds)
08:54:43termerAnyone have insights on `lent string`?
08:55:07termerI'm hoping to give normal string semantics to string views inside a buffer
08:56:09termerI'm building an HTTP parser that avoids copying memory and instead stores all headers inside the original buffer where the request was read to, bookmarking where in the buffer the header names and values are
08:56:57termerThe idea is to represent these bookmarked sections of the buffer as immutable `lent string` values so they can be used as you would expect elsewhere
08:57:26termercasting openArray to `lent string` causes a codegen error
09:23:41FromDiscord<Elegantbeef> Well yea it's going to cause codegen issues termer those are not compatible types
09:24:20FromDiscord<Elegantbeef> In normal Nim `lent T` is only a return type and removes copying if used directly
09:26:38FromDiscord<Elegantbeef> You cannot raise a `openArray[char]` to `string`
09:48:43termerremoves copying?
09:48:46termerwhat do you mean
09:49:13FromDiscord<Elegantbeef> It allows you to borrow read only memory
09:49:23FromDiscord<Elegantbeef> But since Nim has no stable views it must be consumed directly
09:49:39FromDiscord<Elegantbeef> It has the exact same rules as `var T` as a return type
09:49:39termerthis sucks
09:50:01FromDiscord<Elegantbeef> I mean view types do not solve your problem much anyway
09:50:10termerI can't even get the internal representation of openArray, codegen dies if I try to turn it into a byte array and look at it
09:50:11FromDiscord<Elegantbeef> Since you want to take an arbitrary array and convert it to a string
09:50:24FromDiscord<Elegantbeef> I mean what the hell are you doing?
09:50:26termerI already realized the lack of trailing 0 is a problem
09:50:37FromDiscord<Elegantbeef> Not that the compiler should let it get to that far
09:50:51termerbasically I want some nice semantics for reading part of a buffer as its own string
09:51:15termertheoretically I could make a string out of a length and a pointer, but that would be a shitshow
09:51:35FromDiscord<Elegantbeef> Sorta kinda
09:51:55FromDiscord<Elegantbeef> So my understanding is that you want to have a string and have slices dedicated to specific things?
09:51:55termerI wish we didn't have the trailing 0 requirement for "real" strings
09:52:01termeryeah
09:52:08FromDiscord<Elegantbeef> I mean that's only required for C interop
09:52:24termeryeah, but if you try c interop or your string accidentally gets turned into cstring, you're dead
09:52:40FromDiscord<Elegantbeef> What i'd do is move the string into an object that holds a slice for each element than you can do like `getBleh` and it does the allocation
09:52:51FromDiscord<nnsee> that's what i was thinking as well
09:52:58termerwell I don't want to do any allocation to begin with
09:53:09FromDiscord<Elegantbeef> This way you just have `(s: string, header: Slice[int], otherStuff: Slice[int]`
09:53:16FromDiscord<Elegantbeef> Ok so then `getBleh` that stores into a buffer
09:53:28termertell me about Slice
09:53:37FromDiscord<Elegantbeef> It's two integers
09:53:44termerlen and ptr?
09:53:52FromDiscord<Elegantbeef> No
09:54:00FromDiscord<Elegantbeef> It's two integers the start and end index for each element
09:54:32termerthe whole idea is to reuse memory that already exists and only have to return a pointer and length for it
09:55:08FromDiscord<Elegantbeef> You then do `getHeader(parser: Parser, target: var openArray[char]) = target[0.. parser.header.b - parser.header.a] = parser.data.toOpenArray(parser.header.a, parser.header.b)`
09:55:29termerall of these solutions require copying memory
09:55:41termerI don't want a target, I just want to return where the data is and how long it is
09:55:43FromDiscord<Elegantbeef> Nope
09:56:02FromDiscord<Elegantbeef> So then return a slice? 😄
09:56:15termerI can already do that
09:56:20FromDiscord<Elegantbeef> A slice tells you the start index and the end index
09:56:25termerI was just hoping I could give it string semantics
09:56:29FromDiscord<Elegantbeef> Problem solved no copying
09:56:55termerman this sucks
09:57:20FromDiscord<Elegantbeef> Openarray is `ptr char, int` and a string is `(int, ptr (int, char[]))`
09:57:45termerwait what
09:57:46FromDiscord<Elegantbeef> So just do what I wanted and make all common str ops `openArray[char]`
09:57:51termerwhy the (int, char[]) there
09:58:01FromDiscord<Elegantbeef> `capacity, data`
09:58:05termeroh
09:58:24FromDiscord<Elegantbeef> length is on the value part of a string
09:58:28FromDiscord<Elegantbeef> capacity is stored before the data
09:58:57termermagic
09:59:03termerI wonder how much of the stdlib supports openArray
09:59:19termerI wish views wasn't experimental
09:59:20FromDiscord<Elegantbeef> unicode and parseutils for certainty
09:59:29FromDiscord<Elegantbeef> Pretty much nothing else supports it
09:59:39termeryeah, that's what I figured
09:59:46FromDiscord<Elegantbeef> yea views are something we really need
10:00:09FromDiscord<nnsee> I'd really like a seaside view
10:00:15FromDiscord<Elegantbeef> I mean Patitotective did make a PR for strutils, but Araq said no
10:00:21termerwhy no?
10:00:39FromDiscord<Elegantbeef> Don't recall, probably demons or something
10:01:41FromDiscord<Elegantbeef> > strutils is not for performance, it's mostly for convenience. parseutils is for performance.
10:03:46termerwhat the fuck
10:04:20FromDiscord<Elegantbeef> Luckily it's not rocket science to make a `oastrutils` 😄
10:04:35FromDiscord<Elegantbeef> I still want a `scanf` for openarray
10:05:51termerit's not rocket science, but it is work
10:08:24termerok, I can do string comparison with openArray
10:08:27termerthis should be fine
10:15:24termerI wonder why HSlice exists at all if both are supposed to be indexes
10:17:35FromDiscord<Elegantbeef> So you can do `1..^2`
10:30:10termeroh
10:58:59*cm quit (Quit: Bye.)
10:59:19*cm joined #nim
11:03:36FromDiscord<graveflo> is `getImpl` suitable for mutating and re-emitting a proc definition from a macro? I think I am getting re-definition errors because I am copying the symbol, but even if I try and work around that the procs that are re-emitted aren't exported like the input ones are. Is there information loss in `getImpl`?
11:39:32FromDiscord<odexine> In reply to @Elegantbeef "Luckily it's not rocket": oautils
11:39:50FromDiscord<odexine> Oau Tils
11:43:33FromDiscord<graveflo> In reply to @graveflo "is `getImpl` suitable for": nvm I fixed the infix and that seems to work
11:53:32ZevvPMunch: ping
11:54:29ZevvPMunch: do any of your ratel targets run without --lto?
11:55:13Zevv--flto that is
11:59:01PMunchI believe all of them would
11:59:23PMunchZevv, why do you want to know?
11:59:32Zevvever tinkered with -ffunction-sections -fdata-sections and -fgc-sections instead?
11:59:39Zevvwell, just playing around a bit on a tiny target
11:59:47Zevvflto makes the .elf and .o's no fun
12:00:11PMunchAh right
12:00:34Zevvi was running nim on a tiny riscv32 with only 8kb of RAM and flto is the only way to get all the nim layers to go away
12:00:59Zevvi made my own rv32i core, the fun i have
12:01:00PMunchHaven't really tinkered too much with any of these flags
12:01:17Zevvalso, show the shirt!
12:01:19PMunchHowever I am programming a chip now which uses those flags
12:01:32Amun-RaZevv: flto worked better than sections?
12:01:39Zevvdefinately
12:01:44Amun-Rahmm
12:02:01*jmdaemon quit (Ping timeout: 260 seconds)
12:02:24Zevvlto is pretty good these days. Simple nim code ends up as one function entry point, it all gets optimized away
12:02:28PMunchZevv: https://uploads.peterme.net/knightsnim.jpg
12:02:30Zevvno more NimMain and friends
12:02:35PMunchThe shirt!
12:02:36Zevv\o/
12:02:46Zevvcame out pretty well
12:02:54Amun-RaPMunch: #takemymoney
12:02:54PMunchSome other people in #offtopic asked if I could share the design
12:03:07Zevvif you buy me a beer next time we meet
12:03:38PMunchZevv, yeah I'm a bit surprised actually. The file you sent me looked like it was too low res to look great. But the result came out perfect
12:03:48PMunchZevv, most definitely!
12:03:56Zevvwell, you can just revectorize stuff right
12:04:08PMunchSure, but that's always a lossy process
12:04:35PMunchAnd when the result comes out this good there's not much point
12:05:06FromDiscord<nnsee> AI upscaling is pretty damn good these days and isn't inherently lossy
12:05:11PMunchZevv, wait you made your own core?
12:05:22FromDiscord<odexine> I assume within an FPGA?
12:05:33Amun-Raespecially if you convert bitmap to vector image
12:07:15Zevvsure just fpga. not burning my own silicon
12:07:33PMunchThat makes a lot more sense :P
12:07:39PMunchStill though
12:08:07PMunchAnd yeah, I had to get a patch in to get NimMain to go away completely
12:08:18PMunchIt tried to do access some volatile
12:08:19Zevvwell flto does that for me
12:08:28PMunchNow it does, that wasn't always the case
12:08:50Amun-RaI've to do some tests with my browser when I get home
12:09:00PMunchhttps://github.com/nim-lang/Nim/pull/19545
12:09:01FromDiscord<odexine> OOT but dang I kinda wanna get an FPGA too
12:09:08ZevvPMunch: ah nice.
12:09:29*azimut quit (Ping timeout: 255 seconds)
12:12:39Zevvcurious: what was that change?
12:13:29*azimut joined #nim
12:14:11PMunchThe one I linked?
12:14:32anddam Zevv | i made my own rv32i core, the fun i have <- R E S P E C T
12:14:48anddamZevv: mind a query?
12:14:57Zevvsure
12:15:59PMunchBasically it put a marker down so it could find the stack bottom. This was marked volatile to avoid it being optimized away. The marker was only required for `--mm:refc` and possibly some others. Definitely not required for ARC/ORC at least. So the change was just to make this conditional on the MM used
12:19:45Zevvright, makes sense. nice.
12:19:48Amun-RaZevv: verilog/vhdl?
12:20:02Zevvverilog. i don't think i have a preference, just what i happened to use first.
12:20:02Amun-RaI only wrote rv32/64 emulator
12:20:04Zevvbut it's all hell.
12:20:21Zevvverilog is nice as a compilation target, but as a language it's just cumbersome
12:20:26Amun-RaI prefer verilog
12:20:31Zevvproblem is, there's still no proepr alternatives :)
12:21:38Zevvhttps://raw.githubusercontent.com/zevv/riscv/master/hdl/cpu.v
12:22:32Zevvit's slow and stupid, but it synthesizes as small as possible.
12:28:11Amun-RaZevv: what device do you use?
12:28:21Zevvice40 5 something
12:28:30Amun-Raoh, same
12:28:43Zevvwhat are you suing it for
12:28:50Zevv s/using/
12:29:03Amun-RaI bought it bc of opensource toolchain
12:29:07Zevvsame :)
12:29:25Amun-Rawriting my own 6502 and z80 implementation ;)
12:29:39Zevvgood, good
12:30:04Zevvi'm going full retro, ported my forth on it.
12:30:19Amun-RaI have ice40 stick and two boards name I don't remember
12:30:21Amun-Ranice
12:30:30FromDiscord<odexine> Where’d you buy your boards?
12:30:43Zevvyour local electronics supplier. Mine's from farnell I guess
12:31:07Amun-Raice stick - I don't remember, Olimex boards - olimex.com
12:31:23Zevvhttps://nl.farnell.com/lattice-semiconductor/ice40up5k-b-evn/breakout-board-ice40-ultraplus/dp/3770328?st=ice40
12:31:26Amun-Rahttps://www.olimex.com/Products/FPGA/iCE40/iCE40HX8K-EVB/open-source-hardware
12:31:58Amun-Rahttps://pl.farnell.com/lattice-semiconductor/ice40hx1k-stick-evn/ice40-hx1k-icestick-eval-kit/dp/2355207
12:32:08Amun-Rasorry for polish locale in the 2nd link
12:32:30Zevvadvantage of the breakout board is that it's USB
12:32:42Zevvah the stick as well of course
12:32:50Amun-RaI have two xilinx boards but I'm quite alergic to xilinx ide
12:32:59Zevvthat was the reason I moved to yosys
12:33:16ZevvI did xilinx 2 decades ago. Figured out how to use all the tooling on the cmdline but still hated it
12:33:22Amun-Rasame
12:33:51Zevvyosys is also a bitch every now and then. but the people at #yosys are cool, and you can just open it up ot see what's going on
12:33:52PMunchOh fun.. One of my two very rare prototype boards seems to have decided to die on me
12:34:02ZevvIt's a pita interpreting the critical path timing reports
12:34:12ZevvPMunch: two even
12:34:44PMunchAnd with the other it's saying that it doesn't have a SIM card in the SIM slot, even though I've verified that it works in my phone..
12:35:15Zevvi hate hardware.
12:35:45PMunchIt's just the worst..
12:36:09Zevvso. how is nim these days. any news?
12:40:16FromDiscord<nnsee> extraordinarily nimmy
12:40:45PMunchSame old mostly, we're up to version 2.0 now. Some neat libraries have come out, users come and go. Status is doing a big tooling push, so hopefully nimsuggest and friends will improve soon
12:43:43Zevvsweet.
12:46:53PMunchFuthark still works pretty great, which I'm happy with :)
12:49:12Zevvpfff who calls his project "cows"
12:49:30Amun-Ratucows? ;)
12:49:45Zevvyou that old
12:49:49Amun-Ra:/
12:50:12PMunchHaha, cows?
12:50:22Zevv
12:50:24Zevvmeans cows.
12:50:31Zevvor sheep.
12:51:24Amun-Raᚠ is fehu
12:51:49Zevv"with the original meaning of 'sheep' or 'cattle'"
12:51:51Zevv:)
12:51:58Amun-Raright :>
12:52:19PMunchAah right :P
12:52:43PMunchIt's also the F an V sounds, and the first rune in the "word" Futhark
12:52:58Zevvyou gave it some solid thought eh
12:53:06Amun-Raᚠ is one of the "futharks" ;)
12:55:24PMunchThat would be like saying A is one of the alphabets
12:55:54PMunchFuthark is just the first six runes I believe, so it's more like QWERTY, just a list of letters
12:56:10PMunchZevv, I mean the name has a surprising amount of thought behind it
12:56:24Zevvnaming things is hard.
12:56:30Zevvyou did well.
12:56:32Amun-Rait's a sound present in elder furthark and younger futhark
12:57:24PMunchThe project reads the old script of C
12:57:42Amun-Raye olde c
12:57:53Zevvi think it's time for the world to leave the C runtime behind.
12:58:00Zevvtoo bad for all the code that we won't be using anymore
12:58:50Zevvbut stuff just doesn't scale anymore. one stack per thread. it's sad.
12:59:10Zevvthe whole idea of control flow being like it is is sooo 60s
12:59:13Zevv50s?
12:59:53PMunchWait, do you want more than one stack per thread?
13:00:05PMunchOr something else entirely?
13:00:11Zevvsomething else entirely.
13:00:16Amun-Ratbh I like C
13:00:18Zevvstacks are too limiting
13:00:25ZevvI love C. and always will.
13:00:32Amun-Rait's lacking, but still
13:00:56Zevvbut the paradigm does not scale in modern times. it's my old rant, no news here. threading is not the way to do things.
13:01:03Zevvlucky i'm too busy to rant today.
13:02:16PMunchHmm, I'm very interested in what you imagine as an alternative. Might've told me already and I've already forgotten
13:02:47Zevvsame old same old. golang does it.
13:02:53Zevvcps does it.
13:03:23Zevvhaving control flow as a first class citizen of your language
13:04:12Zevvbtw, did you go to FOSDEM last week?
13:04:16Zevvthat was what the shirt was for?
13:04:34PMunchYes I went to FOSDEM!
13:04:39Zevv\o/
13:04:43PMunchThe shirt didn't arrive in time unfortunately..
13:04:52Zevvbwah that's sad.
13:04:56PMunchYeah..
13:04:56Zevvlearned anything new?
13:06:30PMunchWell we had some interesting discussions about Nim. Learned that D is pretty similar to Nim in terms of which features it offers. And that Westvletern is a pretty amazing beer
13:06:59Zevvah you had the D-talk!
13:07:15PMunchI went to a couple interesting talks, found a cool cube-sat on a stand, but I mostly go to talk with people
13:07:32PMunchZevv, had the D talk? It was a 50 minute talk on the main track this year
13:08:02Zevvooh i though you had a beer-driven discussion with a D adept
13:09:25*KhazAkar joined #nim
13:10:17PMunchAh no, unfortunately not. But we talked to the guy afterwards, seemed to want to check out Nim again by the end of it :P
13:10:37PMunchOh, and jtv/jviega had written a talk about Chalk which was pretty cool
13:10:58PMunchHe couldn't attend unfortunately so it was held by one of his co-workers who was also really nice
13:11:14Zevvwhat's Chalk
13:13:54PMunchhttps://crashoverride.com/docs/chalk
13:13:58PMunchPretty cool project
13:14:50PMunchBasically it injects meta-data into your build artifacts (or docker containers). Which can then be gathered later
13:14:58PMunchWith Docker containers it can also self-report
13:15:35PMunchSo you can see which versions are running, which build flags where used during building, what the environment was, etc.
13:17:31Zevvlike, common best practic
13:17:32Zevve
13:17:44Zevvnice.
13:18:01Zevvit's one problem with unix of course, that there is no way to properly store metadata with your files.
13:18:28PMunchextended file attributes?
13:18:38Zevvyeah good luck rsyncing that around
13:18:51Zevvbad example. rsync can do that.
13:21:15FromDiscord<nnsee> the main problem with xattr is that on most fs's, the xattr max size limit is comparatively small
13:21:39FromDiscord<nnsee> usually 4K, which isn't really that much
13:22:39Zevvalso most tooling ignores xattrs by default
13:22:45Zevvcp, tar, rsync, whatever
13:22:49Zevvyou better take care or you lose it.
13:23:12Zevvand it's nice to add a magic section with some strucutred data to your elf files of course
13:23:20Zevvbut with pain text source files it's a pain.
13:25:06PMunchOh yeah xattrs aren't great, but it's the closest thing to a solution I could think of
13:25:26PMunchBut yeah Chalk adds a section in the ELF file I believe
13:33:24FromDiscord<jviega> With plain text source files it just adds the data in a comment.
13:37:47Zevvfair enough
13:39:21PMunchOh hi jviega
13:44:13FromDiscord<jviega> Hey 🙂
14:17:02FromDiscord<zumi.dxy> > it's one problem with unix of course↵zevv: i thought it was a general problem?
14:17:42FromDiscord<zumi.dxy> in-file tags or "sidecar" tags seem to be the best way around the metadata problem
14:18:17FromDiscord<zumi.dxy> no matter the format
14:18:44FromDiscord<zumi.dxy> because if it's stored inside the file system, well...
14:20:23FromDiscord<jviega> Well, Chalk lets you put arbitrary metadata directly in formats it supports, and signs to detect tampering. No PE plugin written yet, but otherwise, we def use it for a bunch of things.
14:22:04FromDiscord<zumi.dxy> y'know, I'd searched for ways my tags can be stored and searched reliably in images↵custom software, sqlite databases, xattrs, …↵then I remembered that EXIF, IPTC, and dedicated camera image management software existed
14:22:19FromDiscord<zumi.dxy> XMP…
14:40:36*Ekho quit (*.net *.split)
14:40:36*entikan quit (*.net *.split)
14:40:36*oz quit (*.net *.split)
14:40:50*ox joined #nim
14:40:52*entikan joined #nim
14:45:47Zevvyeah, it's general of course. __MACOS__ is not a proper solution
14:54:02*Ekho joined #nim
15:02:28Amun-RaZevv: https://dpaste.com/9U5HFDVZU
15:02:48Amun-RaI did some tests
15:03:10Amun-RaI mean sections and lto are compiled with release=1
15:03:44Zevvright. so lto has the best results still.
15:03:58Amun-Rayes
15:04:10Zevvit's not that significant at this scale, but for tiny platfors the results can be relatively large because it cleans up the cruft
15:04:31Amun-Ramhm
15:07:06Amun-Raand I have to upgrade my cpu… :>
15:13:20Zevvhow so
15:16:43Amun-Rait's pretty old ryzen and there's big difference between compiling time on my box and one at work
15:17:06Zevvso compile at work
15:17:25Zevvit's always better to run on someone else computer anyway
15:17:32Amun-Ra:>
15:17:57Amun-RaI think I'll switch from 2600 to 5800x3d
15:22:39*PMunch quit (Quit: Leaving)
15:40:32*azimut quit (Ping timeout: 255 seconds)
15:53:25*derpydoo joined #nim
17:33:28*PMunch joined #nim
18:55:27*xutaxkamay joined #nim
19:20:10*Guest8 joined #nim
19:22:52*Guest8 quit (Client Quit)
20:06:14*PMunch quit (Quit: Leaving)
20:18:32FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=JJQvaGAWkKpW anyone able to point out why I'm getting this error?↵`/home/chronos/Projects/Nim/Nimberite-Development/testserver/src/nimberite/eventsystem.nim(61, 12) Error: type mismatch: got 'EventHandler[eventsystem.A]' for 'a' but expected 'A = object'`↵It's line 57 that raises this error specifically rip
20:20:14FromDiscord<Robyn [She/Her]> It's a bit confusing to me honestly
20:23:24FromDiscord<leorize> welcome to typed land
20:24:05FromDiscord<Robyn [She/Her]> Is there an obvious issue I'm missing?-
20:24:14FromDiscord<leorize> although this doesn't look like a typed bug \:p
20:24:20FromDiscord<leorize> luckily you did not touch the proc ast
20:25:01FromDiscord<Robyn [She/Her]> In reply to @leorize "luckily you did not": All I did is make sure it fits within a specific format
20:27:03FromDiscord<Robyn [She/Her]> It was a naming problem
20:27:07FromDiscord<Robyn [She/Her]> That was irritating-
20:30:10FromDiscord<leorize> why would you have a naming problem?
20:32:14FromDiscord<leorize> oh lol
20:32:22FromDiscord<leorize> yea I see it
20:32:26FromDiscord<leorize> typical template issue
20:32:35FromDiscord<Robyn [She/Her]> :P
20:32:52FromDiscord<Robyn [She/Her]> `/home/chronos/Projects/Nim/Nimberite-Development/testserver/src/nimberite/eventsystem.nim(87, 3) Error: Invalid node kind nnkLambda for macros.`$`` fun
20:34:31FromDiscord<leorize> you probably forgot a repr somewhere
20:34:31FromDiscord<leorize> I don't even know why `$` exist when it doesn't work 90% of the time
20:34:44FromDiscord<Robyn [She/Her]> Makes sense
20:39:09FromDiscord<jviega> What's the canonical cast to get a cstring to pass to something that takes an openarray[uint] plus a length (I'm tracking the length, ofc).
20:39:39FromDiscord<leorize> `cast[ptr UncheckedArray[uint]](cstr).toOpenArray(0, len - 1)`
20:40:00FromDiscord<jviega> That's going to copy the data is it not??
20:40:00FromDiscord<odexine> In reply to @leorize "I don't even know": Should have been called render honestly
20:40:12FromDiscord<leorize> it won't
20:40:18FromDiscord<jviega> Okay thanks
20:40:42Amun-Rathat's going to fail on some cpu archs
20:41:04FromDiscord<leorize> `openArray` is just a `ptr + length` pair
20:41:16FromDiscord<leorize> most allocators allocate on the machine word boundary
20:41:17FromDiscord<leorize> should be fine
20:41:46FromDiscord<jviega> Got it, thanks
20:41:53Amun-Racan cstr start at unaligned address?
20:42:11FromDiscord<leorize> why not?
20:42:23Amun-Ra→ SIGSEGV ;>
20:42:49Amun-Raor bus error… true… those cpu architectures are not popular anymore
20:42:57FromDiscord<leorize> the trick is that most allocators allocate at the word boundary
20:43:19FromDiscord<leorize> so as long as your cstr is compatible with `free()` it should work assuming you slice from index 0
20:44:08FromDiscord<leorize> now, whether nim allocator allocate at the word boundary is something else \:p
20:44:15Amun-Ra;)
20:44:33FromDiscord<leorize> but it should, or `alloc()` would never work
20:45:08FromDiscord<leorize> word boundary allocation is pretty much required when `malloc` doesn't know anything about alignment
20:46:20Amun-Raiirc malloc may not align to specific size according to C standard, there's aligned_alloc since C11, it's more academic discussion than real life problem tbh
20:46:26FromDiscord<leorize> nim allocator more or less implement the malloc API, so it must allocate at word boundary
20:46:45FromDiscord<leorize> yea, because C's machine model is pretty dumb
20:47:13Amun-Rait started in weird, different times
20:47:30FromDiscord<leorize> true
20:47:34FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=MAeSsZwPLqNy
20:47:38FromDiscord<leorize> at least these days we can mandate two complement now
20:48:03Amun-Raand at least these days non uint8/16/32_t architectures are long since gone ;)
20:48:40FromDiscord<leorize> i'm glad that they settled on 1 byte = 8 bits
20:48:58Amun-Ramhm
20:49:37FromDiscord<Elegantbeef> I'd prefer 8.5 bits
20:49:52Amun-RaI remember programming on some TMS320 DSP mcus (CHAR_BIT == 16 or 32)… I wouldn't repeat that experience again
20:51:49FromDiscord<leorize> so do you need help?↵(@Robyn [She/Her])
20:56:01FromDiscord<Robyn [She/Her]> I think I typed out my issue but then forgot to send it 😅 sorry↵Yeah the issue I'm having is that I don't know why I'm getting a mismatch error here when it seems to be valid
20:56:43FromDiscord<leorize> it's simple, replace `A` with `B`
20:58:51FromDiscord<Robyn [She/Her]> That doesn't make sense to me?
20:59:28FromDiscord<leorize> so `a` is of type `EventHandler[B]`
20:59:49FromDiscord<leorize> which means `T = B` for your `registerListener`
21:00:04FromDiscord<leorize> next, you wanted `t: typedesc[T]`, which now must be `B`
21:00:13FromDiscord<leorize> so none of the overload can match
21:00:27FromDiscord<leorize> since you put `A` there for all of your calls
21:01:17*xutaxkamay quit (Ping timeout: 268 seconds)
21:03:23FromDiscord<Robyn [She/Her]> Ah that fixed it, thanks!
21:05:09FromDiscord<Robyn [She/Her]> My event system is now complete~
21:05:41FromDiscord<Robyn [She/Her]> I probably should polish this for use as a library installable by Nimble
21:08:44FromDiscord<Robyn [She/Her]> Now I need another clever name for the lib 😭
21:09:05FromDiscord<Robyn [She/Her]> I have another (more limited) event system called 'Trigger' so not sure what I could call this
21:09:09FromDiscord<Robyn [She/Her]> Gun? :P
21:14:45FromDiscord<Robyn [She/Her]> Pulse is an Idea :P
21:19:24FromDiscord<Elegantbeef> I implemented trait unions and for free got some of that lovely Rust style inheriting
21:19:24FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1206711177258729502/image.png?ex=65dd005c&is=65ca8b5c&hm=8389053aa36f1a921af607e0fa1b49c3d50f325ffa9c088940408aee92146309&
21:19:30FromDiscord<Elegantbeef> This is becoming fancy!
21:20:02FromDiscord<Elegantbeef> Since `print` expects `$` you can just call `print` on a `Traitor[Debug]` 😄
21:23:00FromDiscord<odexine> Cursed
21:23:12FromDiscord<odexine> (Pretty cool really)
21:26:57FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "image.png": I wanna end up using this somewhere, not sure where currently :P
21:37:32FromDiscord<Elegantbeef> It's pretty nice
21:37:36FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1206715751998947368/image.png?ex=65dd049e&is=65ca8f9e&hm=fc1883e378751ba79bed1b99376e2b13b992cd41093036d6f53d610635369ab7&
21:37:36FromDiscord<Elegantbeef> Especially this stuff
21:37:47FromDiscord<Elegantbeef> Where you can use it dynamically or statically
21:38:36FromDiscord<odexine> That’s one buff string 💪
21:38:47FromDiscord<Elegantbeef> It drinks the best milk
21:40:28FromDiscord<Robyn [She/Her]> Aah... Gotta make my code work for futures, yay...
21:41:05FromDiscord<odexine> Then it’ll never break, cuz…
21:41:12FromDiscord<odexine> It’ll work in the future :baqua:
21:41:23FromDiscord<Robyn [She/Her]> That was so bad oh my god
21:41:45FromDiscord<odexine> Yeah sorry I’m about to go buy a cyanide pill for me to ingest
21:42:26FromDiscord<Elegantbeef> Just remember to jump out a window and do a few flips to die badass
21:42:43FromDiscord<Robyn [She/Her]> ^^
21:49:38FromDiscord<Robyn [She/Her]> It now works with futures in a shady way
21:55:50FromDiscord<Robyn [She/Her]> Does Nim even work with objective C on Windows? Like, what does it use compilation?
21:56:02FromDiscord<Robyn [She/Her]> And is it worth testing for ObjC support specifically in my lib?
21:56:10FromDiscord<odexine> Does objective C even compile on windows
21:56:12FromDiscord<Robyn [She/Her]> I only really care about C and C++ tbh
21:56:27FromDiscord<Robyn [She/Her]> In reply to @odexine "Does objective C even": That's partly what I'm asking :p
21:56:40FromDiscord<odexine> It does
21:56:45FromDiscord<odexine> GCC compiles it it seems
21:56:52FromDiscord<odexine> Of course no Mac specific libraries
21:57:51FromDiscord<odexine> So I doubt the usefulness of it
22:01:46FromDiscord<Robyn [She/Her]> Hm
22:02:52*antranigv left #nim (Leaving for now, I'm at https://antranigv.am/)
22:25:04FromDiscord<lx12ucy> is it possible to get the size of a directory in nim
22:25:20FromDiscord<lx12ucy> getFileSize from std/os doesn't work
22:26:59FromDiscord<lx12ucy> nvm, it just doesn't like if i write \~/
22:47:03*advesperacit quit ()
23:18:14FromDiscord<Robyn [She/Her]> https://github.com/Nimberite-Development/Pulse-Nim new lib go brrr
23:25:07FromDiscord<Robyn [She/Her]> Now the question is... Should it be on Nimble
23:34:33*pmp-p quit (Ping timeout: 260 seconds)
23:42:52FromDiscord<Robyn [She/Her]> Beef, take a look at this amazing library I have made as a kinda shitty event system~
23:49:20FromDiscord<nafzorob> sent a long message, see https://pasty.ee/MUKQRBYRiPnA
23:58:10*pmp-p joined #nim