klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
antranigv has quit [*.net *.split]
hrberg has quit [*.net *.split]
nanovad has quit [*.net *.split]
rwb has quit [*.net *.split]
Andrew_ has quit [*.net *.split]
jeaye has quit [*.net *.split]
immibis has quit [*.net *.split]
stefanct has quit [*.net *.split]
clever has quit [*.net *.split]
tanto has quit [*.net *.split]
dormito has quit [*.net *.split]
simpl_e has quit [*.net *.split]
ghostbuster has quit [*.net *.split]
eau has quit [*.net *.split]
vancz has quit [*.net *.split]
vny has quit [*.net *.split]
pie_ has quit [*.net *.split]
V has quit [*.net *.split]
rwb has joined #osdev
simpl_e has joined #osdev
Andrew- has joined #osdev
stefanct has joined #osdev
antranigv has joined #osdev
nanovad has joined #osdev
V has joined #osdev
tanto has joined #osdev
jeaye has joined #osdev
dormito has joined #osdev
vny has joined #osdev
ghostbuster has joined #osdev
tanto has quit [Ping timeout: 268 seconds]
tanto has joined #osdev
vancz has joined #osdev
pie_ has joined #osdev
gorgonical has quit [Remote host closed the connection]
wootehfoot has quit [Read error: Connection reset by peer]
nanovad has quit [Ping timeout: 248 seconds]
pog has quit [Ping timeout: 265 seconds]
nanovad has joined #osdev
<mcrod> it is quiet.
<jjuran> was
<heat> NOISE
<heat> im too busy autogenerating C++ source from json
<heat> sorry
oac has quit [Quit: oac]
<mcrod> i'm trying to figure out why this stupid toolchain script is working fine on linux, but not mac
<mcrod> i'm also convinced that CMake is the most poorly designed piece of shit on the earth
rnicholl1 has joined #osdev
<heat> you said it was great like 3 days ago
<mcrod> wise people are open to changing their minds in the face of new information
<mcrod> basically I'm bitching about the fact I need to patch CMake's own CMakeLists.txt when compiling CMake so it can use lld instead of ld for speed
<heat> ok so it's your problem
<heat> brilliant
<mcrod> no it isn't
<mcrod> the intuitive thing to do, -DCMAKE_LINKER:STRING="lld" does not work as one might expect.
<mcrod> if nothing else, that should pass -fuse-ld=lld to clang
<heat> LDFLAGS="-fuse-ld=lld" cmake
<mcrod> does that actually work
<heat> yes
<mcrod> jesus christ, it does.
<mcrod> this is why i love you
<mcrod> and why you are loved among us
<mcrod> <3
<heat> <3
<heat> i'm fairly sure gn and bazel are like the only ones that ignore the typical CFLAGS stuff
<heat> because google or something idk, im not paying attention
<mcrod> in a perfect world, you could configure everything yourself, and still get the nice CMake goodness
<mcrod> I've seen people bitch whenever I add -pipe to the build flags, because "you're not supposed to change the build flags"
<mcrod> and I am puzzled by these people, puzzled I tell you
<heat> to what build flags?
<mcrod> any, whether global or target based
<mcrod> e.g. target_compile_options(heatdidntfeedthecat PRIVATE -pipe)
<mcrod> "you can't do that! that's compiler specific stuff!!!!!!"
<heat> that looks silly to add
<heat> but i dont speak cmake soo
<heat> like, traditionally, you take whatever's in the environment, and only add what you REALLY need
<mcrod> i mean, i'd prefer -pipe to be a global thing, because the compilation is a little tiny bit faster
<heat> larger projects find this hard as fuck to use, so you have gn or bazel that *completely* ignore CFLAGS and stuff, and give you switches you can pass at build time
<heat> also Kconfig, Kconfig works similarly
<heat> you do not *need* -pipe to compile your project though, so unless the change is massive i would omit that
<mcrod> I also don't *need* -Wall to compile the project either
goliath has quit [Quit: SIGSEGV]
<mcrod> but to your argument, -Wall is kinda massive
<heat> Wall is substancial
<heat> stuff like Werror isn't and is actively harmful when deploying
<bslsk05> ​'The never ending amount of peanuts in cheek pouches of this hamster' by Repulsive-Pattern-57 (00:00:28)
<mcrod> have a hamster
Andrew- is now known as andrewyu
<bl4ckb0ne> feed it to the cat
dutch has quit [Quit: WeeChat 3.8]
<bslsk05> ​www.reddit.com: Reddit - Dive into anything
<heat> have a philosophy meme
dutch has joined #osdev
mi7 has quit [Read error: Connection reset by peer]
Left_Turn has quit [Read error: Connection reset by peer]
<jjuran> -Werror is a great way to have your code break on a compiler that is perfectly capable of compiling it as you intended
mi7 has joined #osdev
[itchyjunk] has quit [Ping timeout: 246 seconds]
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
Griwes has quit [*.net *.split]
Griwes has joined #osdev
<sham1> Just don't write warnings
rnicholl1 has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
night has quit [Ping timeout: 248 seconds]
Arthuria has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
GeDaMo has joined #osdev
heat_ has quit [Ping timeout: 255 seconds]
[itchyjunk] has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
rnicholl1 has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
night has joined #osdev
slidercrank has joined #osdev
freakazoid332 has quit [Ping timeout: 265 seconds]
wootehfoot has joined #osdev
Arthuria has quit [Ping timeout: 260 seconds]
rnicholl1 has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
rnicholl1 has joined #osdev
wootehfoot has quit [Ping timeout: 255 seconds]
immibis has joined #osdev
wootehfoot has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
gmacd has joined #osdev
vdamewood has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 255 seconds]
Patater has quit [Quit: Explodes into a thousand pieces]
DrPatater has joined #osdev
xenos1984 has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 255 seconds]
Brnocrist has joined #osdev
clever has joined #osdev
vdamewood has quit [Quit: Life beckons]
novasharper has quit [Remote host closed the connection]
smach has joined #osdev
smach has quit [Client Quit]
bauen1 has joined #osdev
Slex has joined #osdev
<Slex> hello guys i need a little help
<Slex> i'm trying to resurrect the mach kernel, variant osf mach, the one used by osf and apple to build mac os. Actually i got it built, because another dude before me worked on it, the kernel support the multiboot
<Slex> and effectively i can boot it from grub or qemu directly.
<Slex> the problem is that it stops during the build and i'm truing to debug it via gdb remotely, but for some reason gdb is searching for a wrong file. it searches for locor.s instead of locore.S
<Slex> locore.s* sorry
bauen1 has quit [Ping timeout: 255 seconds]
<Slex> effectively the dude that worked before me changed the file name from locore.s to locore.S. i build it with -g option, how to instruct gdb to search for locore.S instead locore.s?
bauen1 has joined #osdev
Vercas1 has quit [Remote host closed the connection]
Vercas1 has joined #osdev
<Slex> sorry i did write wrong, it doesn't stop during the build. the build process is ok. it stops during the boot.
<zid> .s vs .S is assembly vs needs to be preprocesed assembly, typically
<zid> and the build script should deal with it
<zid> so not sure what this has to do with boot
<zid> unless mach is assembling stuff at boot time
<Slex> no i don't think it is assemblig stuff at boot time, i can put breakpoints on the pentry. the problem is that when i give the list command in gdb, it searches for locore.s and say doesn't exists, and that's true bercause it is locore.S. i think should be a way toi fix this and making it stops for seacheng locore.s. it porblavbly comes from the compiler putting it in the debug symbols?
<Slex> maybe still reading something old in the build script. makefile
<zid> yea that's just it not being able to give source listings
<Slex> exatly
<zid> I'd just ignore it, it likely never worked
<Slex> i need this to solve the main problem. it seems is wrongly mapping the ram. well probing then ram muchmore mapping. it says the available physiucal space is from 0x101000 to 0x100000
<Slex> that is just 4kb
<Slex> .
<Slex> and it stops to run indeed
<zid> it's assembly though, and you know which file it's from
<zid> you don't need the source, gdb can disassemble just fine
<Slex> ok
<Slex> if a reach the goal to make it boot at all i will setup a proper repo on github
<bslsk05> ​github.com: osfmk-mklinux/model_dep.c at d4d387a93516d0ab853aafbde28a43924c4e1578 · slp/osfmk-mklinux · GitHub
<Slex> that is how mem is probed or whatever it is...
<Slex> that is really old i thinl
<Slex> think
bauen1 has quit [Ping timeout: 260 seconds]
dutch has quit [Quit: WeeChat 3.7.1]
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
goliath has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
<Ermine> where's gog
<mcrod> she'll be back
<zid> heat not here either
<zid> secret tryst?
<mcrod> they're forming an underground osdev
Left_Turn has joined #osdev
<zid> more likely
pog has joined #osdev
<zid> is pog
<zid> pog, I named the cat
Slex has quit [Quit: leaving]
<Ermine> pog: may I pet you
andrewyu is now known as Andrew
Andrew has quit [Killed (lead.libera.chat (Nickname regained by services))]
AndrewYu has joined #osdev
<mcrod> zid has a random cat really just been entering your house/flat?
<bnchs> hi pog
<zid> yes?
<zid> That's how cats work
<bslsk05> ​www.reddit.com: Not My Cat
dutch has joined #osdev
Slex has joined #osdev
<pog> hi
<pog> Ermine: yes
<pog> this is normal cat behavior. we've had numerous cats come in and make themselves at home
<zid> I want attention too
<mcrod> hm, i've never had a pet
<mcrod> although in august i will
<mcrod> i'm stoked to get a cat
<zid> pog: I NAMED THE CAT
<zid> how do I double-caps
<GeDaMo> ⓁⒾⓀⒺ ⓉⒽⒾⓈ
<zid> tell pog I named the cat
<GeDaMo> Pfft! What am I, your secretary? :P
<zid> wait, who have I been sending the money to then
<GeDaMo> Not me :|
<mrvn> mcrod: maybe it will leave soon and enter they/them.
greg0lord has joined #osdev
<pog> zid: what did you name the cat
<zid> Jigsaw.
<pog> cute
<pog> aw poor baby
<mrvn> zid: Is that the "undercover cat infiltrating the dogs headquarters" look?
<zid> do you get it
* bnchs pets pog
<mcrod> pog: may i pog you
<mcrod> mrvn: i don't want the cat to leave :(
<mrvn> mcrod: that was a pronoune joke
<mcrod> o
<mrvn> mcrod: house is a cute kitty but flats left eye was lost in a street fight.
nanovad has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
nanovad has joined #osdev
greg0lord has quit [Ping timeout: 255 seconds]
greg0lord has joined #osdev
<pog> mcrod: yes
* mcrod pogs pog
* pog prr
[itchyjunk] has joined #osdev
greg0lord has quit [Ping timeout: 255 seconds]
<mcrod> finally, I think this stupid script is doing what it's supposed to do
<zid> https://godbolt.org/z/54563oh5K That gcc does exactly what I want here is honestly.. very fortuitous?
<bslsk05> ​godbolt.org: Compiler Explorer
<immibis> i happened to notice that people treat file-and-directory systems as a law of physics and the youngsters are stupid for not understanding them because they are accustomed to systems without them
<GeDaMo> Systems where they're hidden
greg0lord has joined #osdev
greg0lord has quit [Client Quit]
<nikolar> zid, wait how does it work without main
frkazoid333 has joined #osdev
<nikolar> oh i am stupid never mind
<GeDaMo> Codeless code :P
<nikolar> lol yea
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
<zid> You'll find very few .c or .s files have a main in them, infact?
<mcrod> zid: my cousin is over, and pointed to your name and said "is that invader zim"
<zid> Yes, I am invader zim, you can tell because I am both a cartoon and my name is spelled zim
<zid> (invader zim is a cartoon right?)
<mcrod> yes
<sortie> no it's irl
<zid> I was too old by the time it started airing to have watched it I think
<zid> does your counsin think you buy catfood to feed jigsaw
wootehfoot has quit [Read error: Connection reset by peer]
Slex has quit [Quit: leaving]
heat_ has joined #osdev
heat_ is now known as heat
<zid> heat is back!
<mcrod> what the fuck...
<mcrod> I just want to run a goddamn CI build manually
<mcrod> for some reason on this particular one though, I can't
<mcrod> oh I see
<zid> maaan, python is weird
<mcrod> it can be
<mcrod> what the fuck? why the fuck is github's CI so weird
<mcrod> is it really normal for different jobs to require a different OS
<mcrod> why can't the same OS be used for the entire pipeline
<mcrod> oh, I'm an idiot
<mcrod> never mind
* Ermine pets gog
* Ermine pets pog
<zid> python is too hard
<zid> I can't get rid of this , for the indices
<mcrod> huh
divine has joined #osdev
<zid> They're doing some stupid zipped merge enumerate nonsense that I don't understand to make an array on the spot in the print loop
<zid> so I can't just do for x in blah[:1]; print('thing, ' % x); printf('thing\n' % blah[-1]);
<mcrod> yay I think my script is working
<mcrod> WOOOOO
<mcrod> i can't wait until it breaks 10 minutes later!
<mcrod> and it did
<nikolar> nice
<mcrod> hm... I'm not quite sure how to fix this
<nikolar> what are you even trying to do
<mcrod> build a toolchain
<mcrod> using a script I wrote
<mcrod> however
<bslsk05> ​github.com: samething/build_toolchain.sh at main · mcroddev/samething · GitHub
<mcrod> what could go wrong, did
<mcrod> 2023-06-11T16:15:54.8459258Z cp: cannot stat '../cmake/llvm-stage1.cmake': No such file or directory
<mcrod> 2023-06-11T16:15:54.8478682Z ##[error]Process completed with exit code 1.
<heat> wow you're manually checking every exit code?
<heat> wtf
<zid> isn't that just whitewashing the actual error
<zid> turning it from a stat error to a generic error 1
<mcrod> heat: allegedly, that's the Right Way (tm)
<heat> fuck off
<mcrod> hey i said allegedly
<zid> allegedy, heat was nowhere near that reservoir
<heat> #bash needs to eat a dick
<zid> don't believe everythin
<heat> set -e
<mcrod> yes yes yes set -e I know
<mcrod> the build was going fine up until that point though
<mcrod> fuck me
<heat> why are you doing all of this for a trivial project
<heat> is this a coverup?
<mcrod> have you considered
<mcrod> maybe I've never had to do this before, and I want to learnm
<mcrod> *learn
<heat> ok then be normal and create your own operating system hellish timesink
<mcrod> knowing how to do stuff like this is useful
<zid> He's knowledge laundering
<mcrod> thonk
<heat> mcrod, obviously ../cmake won't work if you're in your staging dir
<mcrod> listen to me
<mcrod> this works 100% fine on my system
<sham1> That's not enough
<mcrod> i know that
<mcrod> i'm finishing my statement :p
<zid> It has to work on sham's system too
<mcrod> and it works fine because I've been putting the staging/target directory the same folder as toolchains during my testing
<sham1> Yes. My system is the benchmark. It uses musl so it has to be
<zid> gcc totally bricks if you fuck up making an output dir etc
<heat> https://mywiki.wooledge.org/BashFAQ/035 is active misinformation
<bslsk05> ​mywiki.wooledge.org: BashFAQ/035 - Greg's Wiki
<mcrod> i hate you
<mcrod> you're the anti everything I've been in #bash for
<mcrod> :(
<mcrod> "and it works fine because I've been putting the staging/target directory the same folder as toolchains during my testing" - so when you're in the staging directory, `../cmake` is a thing
<heat> in no way shape or form do people expect utils to not support "prog undashed_arg --option -a"
<heat> in 20-fucking-23
<heat> manually parsing options????
<zid> getopt for life
<sham1> Underscores are fine. It's the spaces that get you
<heat> >Argbash is a simple-to-use yet feature-rich code generator that can either generate the parsing code for your script, tailor-made.
<heat> oh yes, a code generator for argument parsing in my 100 line script
<heat> yes
* mcrod sniff
<sham1> Perl
wereii has quit [Quit: ZNC - https://znc.in]
<zid> okay but who can fix my python
<mcrod> this script shits the bed on mac too.
<mcrod> probably because of realpath
<GeDaMo> zid: let's see it
<heat> yes lets see it
<zid> for f, f_index in face_index_pairs: f_v = [(vi, me_verts[v_idx], l_idx) for vi, (v_idx, l_idx) in enumerate(zip(f.vertices, f.loop_indices))]
<heat> i've been writing python to generate garbage c++ atm
<heat> oh wow that's very pythonic
<mcrod> that's almost unreadable
<heat> as in, unintelligible
<zid> yes, that's why I can't do shit to it
<zid> for vi, v, li in f_v: fw('%d, ' % (totverts + v.index))
<zid> is inside it
<zid> I want to not print the final ', '
<sham1> I can't wait to have to write python for when I have to do my master's thesis
<sham1> Annoying
<zid> if it were an aray I could use [:-1] and [-1]
<zid> but it's some.. intermediate object created a bunch of times? idk
<sham1> zid: join them?
<zid> writing python's not too bad
<zid> sham1: I don't know python
<zid> for v in me_verts[:-1]:
<zid> fw('%f, %f, %f\n' % me_verts[-1].co[:])
<zid> fw('%f, %f, %f, ' % v.co[:])
<heat> yes it's fun to write python as long as it's not pythonic code
<zid> I got that for the verts part, that's easy, it's the faces that are a poo :P
<bslsk05> ​docs.python.org: Built-in Types — Python 3.8.16 documentation
<zid> it's not a string?
<sham1> But the comma is
<zid> those are %f printfs
<zid> oh you mean, form an output string instead of printing it, then chomp the string at the end?
<zid> rather than fixing the python?
<sham1> More pythonic like that :P
<GeDaMo> Can you call fw on the first element then the loop for the rest?
<zid> that's the same as doing it for loop for all then fw the last
<zid> but 0 and 0: not :-1 and -1
<sham1> There's a reason why python likes lists
<zid> no, python likes hash reduce map nonsense
<zid> *I* like lists.
<GeDaMo> fw('%d' % (totverts + f_v[0][1].index)); for vi, v, li in f_v[1:]: fw(', %d' % (totverts + v.index))
<zid> can you splat me it with indentation and stuff in pm/gist?
<sham1> Python doesn't like maps and reduce stuff. There's a reason why lambdas are single line and that reason is called Guido van Rossum
<zid> and whether I keep the zipper merge and shit
<zid> tell that to people who write python sham
wereii has joined #osdev
<bslsk05> ​bpa.st: View paste Z3H3I
<zid> me talking about this is predicated on them having written it like this
<sham1> I do (regrettably) write python
bauen1 has joined #osdev
xenos1984 has quit [Ping timeout: 255 seconds]
<sham1> It's the language of machine learning after all
<heat> hi zid can you rewrite that in haskell with proper reduce and zips and shit
<zid> That prints.. the wrong data, GeDaMo :D
<GeDaMo> Is it just the first one that's wrong or all of them?
<zid> not sure?
xenos1984 has joined #osdev
<zid> .short 5, 3, 13, 8, 47, 6, 82, 8, 61, 4, 25, 2, 65, 7, 33, 7, 87, 5, 62, 4, 81, 3, 45, 1, 2
<zid> 5, 3, 1, 3, 8, 4, 7, 6, 8, 2, 8, 6, 1, 4, 2, 5, 2, 6, 5, 7, 3, 3, 7, 8, 7, 5, 6, 2, 4, 8, 1, 3, 4, 5, 1, 2,
<zid> okay yea so it's right for 1 or 2 of them, coincidentally or not
<zid> and the end is right again
<zid> oh it's just missing some ,
<GeDaMo> Double digits are being split
<zid> yours is on top
<zid> your final fw is inside the big loop
<zid> cus this is nested loops
<GeDaMo> So there are multiple iterations and it's missing the , at the end
<bslsk05> ​gist.github.com: blah.py · GitHub
<zid> Looks like the other loop runs.. 11/12 times
<zid> and the inner loop gets 3 each
<zid> That's why I couldn't do it, I didn't know how to split it in half wrt the zip stuff
<bslsk05> ​gist.github.com: blah.py · GitHub
<zid> I think
<zid> naam sayan?
<GeDaMo> Maybe just use my bit for the second part there?
Vercas16 has joined #osdev
Vercas1 has quit [Remote host closed the connection]
Vercas16 is now known as Vercas1
<GeDaMo> What does fw do?
xenos1984 has quit [Ping timeout: 255 seconds]
<GeDaMo> zid: completely untested https://bpa.st/MDWO4
<bslsk05> ​bpa.st: View paste MDWO4
xenos1984 has joined #osdev
<zid> replace the whole thing with that?
remexre has quit [Remote host closed the connection]
<GeDaMo> Based on incomplete information, yes :P
remexre has joined #osdev
<zid> your ) are unbalanced
<GeDaMo> Oh yeah, needs another ) on the end
<zid> oh, I guessed wrong then
<zid> That prints.. nothing
<zid> oh wait, fw not print
<zid> .short <bpy_struct, MeshVertex at 0x00000239ADFB9558>, <bpy_struct, Mes...
<zid> :D
<GeDaMo> Oh, I see it
<bslsk05> ​bpa.st: View paste ASX6E
Arthuria has joined #osdev
<zid> should I add the ) again
<GeDaMo> Yes :/
<zid> and remember to s/print/fw
<GeDaMo> I still don't know what fw does
<zid> it's printf but to.. the output file
<GeDaMo> Oh, well that might work then
<zid> .short 4, 2, 02, 7, 36, 5, 71, 7, 50, 3, 14, 1, 54, 6, 22, 6, 76, 4, 51, 3, 70, 2, 34, 0, 1
<zid> which is what we expected
<zid> imo
<GeDaMo> Is that missing the , between elements?
<zid> between groups of 3, yea
<zid> also we lost the zip
<zid> but maybe we don't need that? cus we only print.. f_v something
<GeDaMo> There's a whole lot of values in the original that you don't need
<zid> oh maybe we do
<zid> yea
<zid> I can't read enough python to know how the capturing works though
<zid> oh I think maybe I get it now?
<zid> but not why there's a () around v_idx, l_idx
<GeDaMo> Tuple
<zid> but it's a tuple of a scalar and another tuple?
<zid> which is then turned into a triple?
<GeDaMo> enumerate returns an index for each element, in this case the element is a tuple being created by the zip
<GeDaMo> But you don't actually use the index or the second element of the tuple
<zid> enumerate(zip(f.vertices, f.loop_indices)) is a triple of 'vi, (v_idx, l_idx)' which is iterated as f_v = (vi, me_verts[v_idx], l_idx);, I think?
<GeDaMo> You don't need the vi or l_idx
<GeDaMo> It's just me_verts[v_idx].index
<zid> was what I said any good?
<GeDaMo> Er, ... oh, look! A quirrel! :P
<zid> enumerate can disappear then regardless because we don't need the vi part
<GeDaMo> Correct
<zid> idk how the semantics of the zip works though, presumably it interleaves the array? But then we pull a tuple out of it anyway
<GeDaMo> It combines two lists into a list of tuples
<zid> or is each array an array of tuples? but that contracicts the names
<GeDaMo> [x for x in zip([1,2,3],[4,5,6])] => (1, 4), (2, 5), (3, 6)]
<zid> oh and you need to tuplaize it for the x = for thing?
<zid> x,y = for
<GeDaMo> That's a list comprehension
<GeDaMo> [(y,x) for x,y in zip([1,2,3],[4,5,6])] => [(4, 1), (5, 2), (6, 3)]
<zid> for f in face_index_pairs: for i in f.vertices: f_v = (me_verts[f.verteces[i]], f.loop_indices[i])
<zid> but spelling vertices correctly
<zid> That looks sufficiently depython'd?
<GeDaMo> You don't use loop_indices
<zid> oh right it doesn't get zippered in
<zid> it gets tupled
<zid> the zip thing is just a stupidity because they wanted to use the syntax they chose of capturing a tuple return
<zid> right?
<GeDaMo> If you're doing for i in f.vertices then i is already f.vertices[i]
<zid> oh whoops
<zid> for i in enumerate(f.vertices) or whatever then? or for i less than len(f.vertices)? whatever python wants
<GeDaMo> Just for i in f.vertices: f_v = me_verts[i]
<zid> hmm
<zid> I got told f doesn't have a .vertices
<zid> in for f in face_index_pairs: for i in f.vertices
<GeDaMo> You didn't split the tuple from face_index_pairs
<zid> split the tuple from?
<GeDaMo> Try for f, _ in face_index_pairs:
<zid> what on earth
<zid> oh because it's a tuple I get both sides in my f
<zid> not the left side?
<GeDaMo> face_index_pairs is a list of tuples ... yes
<zid> I guess that make sense, but it means you have to know how many args everything has..
<zid> returns, whatever
<GeDaMo> You don't care about the second bit so _ is just a placeholder
<GeDaMo> Yeah, imagine having to know how many parameters things take and type for the return value :P
<zid> hmm
<zid> can only concatenate str not "int" to str, on fw('%d, ' % me_verts[i].index + totverts)
<zid> original has brackets.. *replicates*
<zid> .short 5 3 1 3 8 4 7 6 8 2 8 6 1 4 2 5 2 6 5 7 3 3 7 8 7 5 6 2 4 8 1 3 4 5 1 2
<zid> huzzah
<zid> % has higher prec than + so it was doing fw('%d, ' % me_verts[i].index) + totverts) >_<
<heat> oi govna why r we wroitin python in me osdev channel ye
<GeDaMo> zid is writing SnakeOS :|
<mjg> fw('%d, ' % me_verts[i].index) + torvalds)
<mjg> fixeD
<zid> interesting
<bslsk05> ​gist.github.com: gist:b0d63a77f8822f3f6cba904dff2efd29 · GitHub
<zid> so we need to split that final -1 into three seperate prints
<zid> does this mean index is a triple and each element gets totverts added to it, and I can just capture it into i1, i2, i3 again?
<GeDaMo> No, it means there are three elements in f.vertices
<heat> mjg, do u know if dtrace is remotely portable or am i fucked
<mjg> 2 bsds have it
<mjg> windows has it
<mjg> os x has it
<mjg> lemme think
<mjg> no, u fucked bro
<heat> yeah but the source code is absolutely BSD-and-Solaris-fucked
<heat> i do not have #include <sys/ligmaballs.h>
<heat> btw the windows people seem to still care about dtrace, it got updates even
<zid> okay I have no idea why that fixed it, but it did
<mjg> yer sak bro 's y
<mjg> heat: unpopular opinion: perhaps you got far enough in your custom kernel that it makes sense to abandon it
<zid> I tried to split it into three prints at the end for f.vertices[0], f.vertices[1], f.vertices[2] and I got 5, 1, 2, 5, 1, 2, 5, 1, 2
<zid> so I can just.. delete two prints? But then what the fuck did I chaange
<zid> oh! deleting two prints makes it print 5 5 5 :D
<zid> my indexing is inside out
<GeDaMo> Are you looping for the elements too?
<zid> .short 5, 3, 1, 3, 8, 4, 7, 6, 8, 2, 8, 6, 1, 4, 2, 5, 2, 6, 5, 7, 3, 3, 7, 8, 7, 5, 6, 2, 4, 8, 1, 3, 4, 5, 1, 2
<zid> only took 200 million years
<heat> mjg, to abandon what
<zid> $ as cube.s -o cube.o; objcopy -j.model -O binary cube.o cube.bin
<zid> There, I have mmapable object I can just point a struct at
<zid> and my engine can use
<zid> GeDaMo: oh, https://gist.github.com/zid/4dbabcbebff79e1330d234d936d7b1f2 is what I ended up with, anyway
<bslsk05> ​gist.github.com: gist:4dbabcbebff79e1330d234d936d7b1f2 · GitHub
<zid> I could probably do it 'shorter' with the .join shit, but meh
<GeDaMo> Code you can understand is better :P
<zid> ya
<zid> could I have done erm, '%d, %d, %d\n' % [i in f.vertices] over me_verts + totverts somehow
<zid> in one line
<GeDaMo> Yes
<zid> or would I need to MAP LAMBDA to do the addition
<GeDaMo> You could do it in a join with a list comprehension
gareppa has joined #osdev
tomaw has quit [Quit: Quitting]
bauen1 has quit [Ping timeout: 260 seconds]
<zid> yea I don't know the lyrics to that
<GeDaMo> fw(','.join([str(me_verts[i].index + totverts) for i in f.vertices]))
<GeDaMo> (Probobly)
<zid> oh I can
<zid> me_verts[i].index + totverts) for i in f.vertices
<zid> to do the part I said above
<zid> fw('%d, %d, %d\n' % (me_verts[i].index + totverts) for i in f.vertices being what I *meant* to say above
<GeDaMo> That's good, too :P
tomaw_ has joined #osdev
<zid> write argument must be str not generator
<zid> :(
<zid> need to evaluate it out somehow
<zid> to get an array back
tomaw_ is now known as tomaw
<GeDaMo> Yeah, that's an annoyance
<zid> f_v = (me_verts[i].index + totverts) for i in f.vertices;
<zid> invalid syntax on for
<zid> I swear the other guy did this earlier
<zid> f_v = [(me_verts[i].index + totverts) for i in f.vertices]
<zid> fw('%d, %d, %d\n' % f_v[:])
<zid> I think that's roughly what I want, but it's complaining I gave it a list not a number somewhere
<zid> fw('%d, %d, %d\n' % (f_v[0], f_v[1], f_v[2])) works though
<zid> oh it does work maybe I tyupod and did f[:] or something
SGautam has joined #osdev
gmacd has joined #osdev
valshaped7 has joined #osdev
valshaped has quit [Ping timeout: 240 seconds]
valshaped7 is now known as valshaped
gmacd has quit [Ping timeout: 260 seconds]
gmacd has joined #osdev
q3lont has joined #osdev
gmacd has quit [Ping timeout: 255 seconds]
<zid> GeDaMo: fw('%d, %d, %d\n' % tuple([(me_verts[i].index + totverts) for i in f.vertices])) btw
<GeDaMo> :/
<zid> lists vs tuples fun
<zid> but, I learned a bunch of python doing this, which I suppose is good
<zid> maybe?
<mcrod> python is important
<zid> really? first time I've touched it
<zid> it's about as important as perl imo
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<heat> haskell is the most important language ever
<heat> how else would you configure your window manager
<zid> .ini
<heat> mjg, you didn't tell me what i should abandon, so i'll assume it's my kernel. i don't see why it makes sense to abandon it
<heat> if nothing else, there's a heck of a lot of sunk cost
<heat> like 200k lines of it, and probably more hours than that
<zid> You already abandoned my poor cat
q3lont has quit [Remote host closed the connection]
terminalpusher has joined #osdev
terminalpusher has quit [Ping timeout: 245 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
gareppa has quit [Quit: Leaving]
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 255 seconds]
gmacd has joined #osdev
rnicholl1 has joined #osdev
gmacd has quit [Ping timeout: 255 seconds]
goliath has quit [Quit: SIGSEGV]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 260 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 265 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 260 seconds]
slidercrank has quit [Ping timeout: 260 seconds]
slidercrank has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
Arthuria has quit [Ping timeout: 260 seconds]