▲ 24 r/neovim

nvim-surround multicursor

Is it just me, or does nvim-surround not work with multicursor? I do Q on multiple lines, and v$S) only surrounds the line of the cursor.

reddit.com
u/Subject-Mobile-6250 — 9 days ago
▲ 12 r/haskell

Question on eg. length vs genericLength

Hello! I am working through LYAH, and it says that length accepts an input of Int instead of Num, while genericLength accepts Num, and it cites the reason of backwards compatability. Coming from rust, theoretically you would just want to accept anything that implements the required traits or generics in Haskell, right? What would be the disadvantages of changing length to be generic?

reddit.com
u/Subject-Mobile-6250 — 26 days ago
▲ 0 r/rust

Macros for Crafting Intepreters

Guys, am I crazy? I am not very familiar with writing macros, and while going through the 5th chapter of Crafting Intepreters I have the urge to use macro_rules! or derive macros instead of his plebeian Java code generator script. 1. Is this too overkill? I know derive requires me to have a separate crate for proc macros and have syn and quote as extra dependencies, but I have not gone further into the book and don’t know if it will come in handy. 2. Is it a good way to practice writing macros?

reddit.com
u/Subject-Mobile-6250 — 1 month ago

Rustlings extension

Hello! While working through the Little Book of Rust Macros, I was wondering about a question. Because rustling's exercise set is quite limited(for example no async area, and no testing of the more advanced chapters such as Advanced traits, and for macros specifically not the metaprogramming pattern matching), I was wondering whether rustlings has the ability to add custom extensions with specific additional lessons, such as for the Async book, rustonomicon, macro book and some missing sections? I have been waiting for example for the async section for a while and with no avail...

reddit.com
u/Subject-Mobile-6250 — 2 months ago
▲ 12 r/rust

extern "C" Enum -> Union(Struct)?

Hello! Newbie to rust here, I was wondering with the pub extern "C" ABI does it have the ability to convert rust enums to an equivalent in Rust? Does it do it by wrapping it in a Union(Structs of branches), or how is this implemented, and how can we do so in real rust code?

reddit.com
u/Subject-Mobile-6250 — 2 months ago
▲ 3 r/n_gon

Using health orb as propulsion

You heard that right, I am using health orbs and the yellow orbs for propulsion. This is the highest difficulty, I got here through hard work and the eigenstate tech entanglement! Every time I get a tech I chose health, and now each time it gives me 987 or sth crazy, and the game is not able to load that number instantly so it comes through slowly... Here is the build URL:
https://landgreen.github.io/n-gon/index.html?&seed=83166&tech0=shock%20wave&tech1=energy%20conservation&tech2=energy%20conservation&tech3=energy%20conservation&tech4=energy%20conservation&tech5=energy%20conservation&tech6=energy%20conservation&tech7=energy%20conservation&tech8=energy%20conservation&tech9=energy%20conservation&tech10=contact%20explosive&tech11=zoospore%20vector&tech12=zoospore%20vector&tech13=enthalpy&tech14=enthalpy&tech15=enthalpy&tech16=enthalpy&tech17=enthalpy&tech18=enthalpy&tech19=enthalpy&tech20=stability&tech21=K-selection&tech22=K-selection&tech23=K-selection&tech24=triple%20point&tech25=triple%20point&tech26=superfluidity&tech27=fragmentation&tech28=necrophage&tech29=flash%20freeze&tech30=flagella&tech31=freezer%20burn&tech32=cryodesiccation&tech33=siphonaptera&tech34=heat%20engine&tech35=piezoelectricity&tech36=inverse&tech37=spin-statistics%20theorem&tech38=spin-statistics%20theorem&tech39=spin-statistics%20theorem&tech40=strange%20attractor&tech41=virtual%20particles&tech42=virtual%20particles&tech43=virtual%20particles&tech44=virtual%20particles&tech45=virtual%20particles&tech46=shear%20stress&tech47=shear%20stress&tech48=shear%20stress&tech49=conchoidal&tech50=inductive%20charging&tech51=refrigerant&tech52=buckling&tech53=flywheel&tech54=Halbach%20array&tech55=bound%20state&tech56=bound%20state&tech57=bound%20state&tech58=bound%20state&tech59=bound%20state&tech60=bound%20state&tech61=bound%20state&tech62=bound%20state&tech63=regression&tech64=capacitor%20bank&tech65=emergence&tech66=emergence&tech67=emergence&tech68=emergence&tech69=emergence&tech70=restitution&tech71=inflation&tech72=mass%20driver&tech73=gauge&tech74=gauge&tech75=gauge&tech76=Lie%20group&tech77=Lie%20group&tech78=Lie%20group&tech79=Lie%20group&tech80=ergodicity&tech81=van%20der%20Waals&tech82=Casimir%20effect&tech83=kinetic%20bombardment&tech84=mechatronics&tech85=mechatronics&tech86=torpor&tech87=band%20gap&tech88=band%20gap&tech89=thermal%20runaway&tech90=polariton&tech91=cross-disciplinary&tech92=dead%20reckoning&tech93=dead%20reckoning&tech94=dead%20reckoning&tech95=propagation&tech96=propagation&tech97=propagation&tech98=propagation&tech99=propagation&tech100=propagation&tech101=propagation&tech102=propagation&tech103=propagation&tech104=anti-shear%20topology&tech105=anti-shear%20topology&tech106=anti-shear%20topology&tech107=crystal%20lattice&tech108=exciton&tech109=proportional&tech110=Majorana%20fermion&tech111=abelian%20group&tech112=remineralization&tech113=nuclear%20transmutation&tech114=nuclear%20transmutation&tech115=quantum%20Darwinism&tech116=laser-bot&tech117=laser-bot&tech118=laser-bot&tech119=laser-bot&tech120=laser-bot&tech121=laser-bot&tech122=laser-bot&tech123=laser-bot&tech124=laser-bot&tech125=simulated%20annealing&tech126=antiscience&tech127=junk%20DNA&tech128=weak%20anthropic%20principle&tech129=meta-analysis&tech130=aerostat&tech131=no-cloning%20theorem&tech132=decorrelation&tech133=gun%20turret&tech134=a%20priori&tech135=metamaterial%20absorber&tech136=externality&tech137=control%20theory&tech138=waste%20heat%20recovery&tech139=strong%20anthropic%20principle&tech140=futures%20exchange&tech141=demineralization&tech142=orbital-bot&tech143=orbital-bot&tech144=orbital-bot&tech145=orbital-bot&tech146=orbital-bot&tech147=orbital-bot&tech148=orbital-bot&tech149=orbital-bot&tech150=orbital-bot&tech151=recycling&tech152=boom-bot&tech153=boom-bot&tech154=boom-bot&tech155=boom-bot&tech156=boom-bot&tech157=boom-bot&tech158=boom-bot&tech159=boom-bot&tech160=boom-bot&tech161=commodities%20exchange&tech162=clinical%20peer%20review&tech163=austerity&tech164=foam-bot&tech165=foam-bot&tech166=foam-bot&tech167=foam-bot&tech168=foam-bot&tech169=foam-bot&tech170=foam-bot&tech171=foam-bot&tech172=foam-bot&tech173=non-Newtonian&tech174=options%20exchange&tech175=dynamo-bot&tech176=dynamo-bot&tech177=dynamo-bot&tech178=dynamo-bot&tech179=dynamo-bot&tech180=dynamo-bot&tech181=dynamo-bot&tech182=dynamo-bot&tech183=dynamo-bot&tech184=anthropic%20principle&tech185=nail-bot&tech186=nail-bot&tech187=nail-bot&tech188=nail-bot&tech189=nail-bot&tech190=nail-bot&tech191=nail-bot&tech192=nail-bot&tech193=nail-bot&tech194=frequentist&tech195=residual%20dipolar%20coupling&tech196=Maxwells%20demon&tech197=supercritical%20fission&tech198=combinatorial%20optimization&tech199=quantum%20Zeno%20effect&tech200=optical%20tweezers&tech201=dynamical%20systems&tech202=Bayesian&tech203=non-renewables&tech204=sound-bot&tech205=sound-bot&tech206=sound-bot&tech207=sound-bot&tech208=sound-bot&tech209=sound-bot&tech210=sound-bot&tech211=sound-bot&tech212=sound-bot&tech213=anticorrelation&tech214=correlated%20damage&tech215=world%20line&tech216=quantum%20immortality&tech217=delivery%20drone&tech218=null%20hypothesis&tech219=microstates&tech220=zeitgeist&tech221=axial%20flux%20motor&tech222=fabrication&tech223=mass%20production&tech224=brushless%20motor&tech225=topological%20defect&tech226=preserve&tech227=boson%20composite&tech228=diaphragm&tech229=amplitude&tech230=amplitude&tech231=amplitude&tech232=mycelium&tech233=bubble%20fusion&tech234=peer%20review&tech235=scrap%20bots&tech236=scrap%20bots&tech237=scrap%20bots&tech238=decay%20chain&tech239=chitin&tech240=scrap%20refit&tech241=nail-bot%20upgrade&tech242=open-source&tech243=amalgamation&tech244=fiber%20optics&tech245=ectomy&tech246=filament&tech247=dark%20star&tech248=ricochet&tech249=arsenal&tech250=mechanical%20resonance&tech251=extended%20magazine&tech252=extended%20magazine&tech253=sympathetic%20resonance&tech254=aperture&tech255=self-assembly&tech256=accretion&tech257=network%20effect&tech258=fluoroantimonic%20acid&tech259=adiabatic%20healing&tech260=perimeter%20defense&tech261=entropic%20gravity&tech262=axion&tech263=polonium-210&tech264=dazzler&tech265=fracture%20analysis&tech266=dark%20energy&tech267=active%20cooling&tech268=paradigm%20shift&tech269=orbital-bot%20upgrade&tech270=isotropic&tech271=sentry&tech272=Klemperer%20rosette&tech273=first%20derivative&tech274=entanglement&tech275=quenching&tech276=tessellation&tech277=normal%20mode&tech278=eigenstate&tech279=patch&tech280=dark%20matter&tech281=symbiosis&molMode=1&field=metamaterial%20cloaking&difficulty=7

https://preview.redd.it/phdj2ml0cxeh1.png?width=2940&format=png&auto=webp&s=f3d38d33f54f6a5723371c23f4c2b2feb4e8a073

reddit.com
u/Subject-Mobile-6250 — 3 months ago
▲ 49 r/haskell

From Rust to Haskell

Hello! I have started my programming journey relatively recently, from C and C++ to recently having a great time with Rust! But recently I met a Haskell and Emacs evangelizer(I use arch + nvim + tmux + hyprland btw), and he has been spreading the word... There is a lot of stuff I love in Rust that apparently was ported from Haskell, like traits as types-ish, pattern matching which I really love and better enums(I am not sure on the last one and please forgive me) but he said that if I learn Haskell, I will become a better programmer because of learning the functional programming paradigm... I wanted to ask whether that is true, and if so what kinds of resources are there? For Rust I used the Rust book and Rustlings by the way

reddit.com
u/Subject-Mobile-6250 — 3 months ago

Embedded Linux in Rust

Hello! After learning rust from C and C++, I have grown to like it a lot. I have a little project made on a arduino using C++, but since I will need to switch it to a raspberry pi for a multitude of reasons, I heard there were crates like rpi-pal etc that I could use... tbh the previous project was with a good friend of mine, and he wrote the boiler plate code to interface with sensors and I wrote the specific algorithms for processing data, and so I would also like to gain a rudimentary understanding of the hardware as well while doing this in Rust... I was wondering if you guys had some suggestions on what books or resources I could use to start with this? By the way just for Rust fundamentals I just used the rust book alongside rustlings to learn, maybe there is more I need...

reddit.com
u/Subject-Mobile-6250 — 3 months ago
▲ 22 r/neovim

vim-fugitive vs neogit

Hello! I am new to Neovim(I use 0.12 and vim.pack by the way), and I came over from zed's git panel. I have been using fugitive for about 1-2 months now, but since I have been taking on larger projects these days, and so I prefer a more graphical interface for staging hunks(I know there is gitsigns as well and the keybindings around that). But I feel kind of guilty switching from a CLI like thing to a TUI, and I am not sure what I will lose in the process... What has been your experience with both plugins, and which do you recommend?

reddit.com
u/Subject-Mobile-6250 — 3 months ago

How to learn further maths

Hello! I am a high school student at a fairly good public school in China, and since our school has pretty good resources, so we have mathematical modeling classes. So in those classes, we went over using basic real analysis to prove calc theorems, and I learned a lot... Maybe my situation is a bit different from most posts in this subreddit, but since then I have gotten more interested in math and found some A level resources for further maths and have completed I think further maths 2, which is basically Calc BC and some other adjacent topics, and also I am decently interested in linear algebra(only topic level understanding up to SVD). But recently I have been seeing a lot of people talk about geometric algebra and topology, and what got my interest was that using the outer product and the hodge dual to get the cross product seemed so much more intuitive than going straight into the definition of the cross product, and it has helped me in my learning of physics. And in the future I would like to study something adjacent to mathematical modeling in the future, and I know geometric algebra is not used often there, but I am interested in broader pure math, and so I was wondering whether you guys had any suggestions

reddit.com
u/Subject-Mobile-6250 — 4 months ago

How to improve in CF for fun

Hello! I am a teenager in a fairly good public high school in China, and there are a lot of OIers around me. Some people I know are competing for NOI(at least the preceding rounds), and I knew some C anyways, so I decided to try doing codeforces, but for the past few months because I didn't have any strict learning path, and so have been stuck at problems around 1200 and doing them usually with the aid of AI fixing my solutions or giving me tips(I know that this is not really solving the problem but remember, I didn't have any learning course). I decided to learn some basic C++ standard stuff along the way like vectors maps and bitsets etc along the way, and they have been super helpful, a lot easier to solve problems hahaha. Tbh because I am in a public school and we have Gao Kao, so I don't have much time to do the CF competitions in Div 3 and 4, and so just by the problems that I can solve myself, usually 1200-1300, and with hints from AI I can maybe reach for 1300-1450 ish but not sure. I have found a Competitive Programmer's handbook, but I have had a lot of trouble with it, because the author is very brief with each algorithm and I always want to implement it myself, but it is hard to understand sometimes... Does anyone have any advice on resources, or just regarding this handbook, or just CF overall, how to improve? I do not plan to take any like OI stuff, because the joke is that in China, one cannot compete with people who started coding at 3rd grade... But I still love doing this, and I have fun!

P.S. Sometimes I get stuck on really easy problems, and when I ask AI, the solution is so obvious... How can I get over these problems where I just don't have the right mindset?

reddit.com
u/Subject-Mobile-6250 — 4 months ago