Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 634 635 636 637 638 639 640 641 642 643 644 .. 1850
184,923 events total
2022-05-02 18:41:31 <geekosaur> @where cis194
2022-05-02 18:41:31 <lambdabot> https://www.seas.upenn.edu/~cis194/spring13/lectures.html
2022-05-02 18:41:36 <geekosaur> might be helpful
2022-05-02 18:42:09 <geekosaur> it's not what I used to learn, but I had some SML/NJ experience so I used a tutorial aimed at SML/NJ programmers
2022-05-02 18:45:29 × arjun quits (~arjun@user/arjun) (Remote host closed the connection)
2022-05-02 18:45:53 <Xioulious> feels like i first need to learn how the different symbols are used and what they do, like im used to just using | for "or" and == for "equal" but in haskell it seems to be || and ===, the differences between -> and =>, etc
2022-05-02 18:47:11 pthrr joins (~pthrr@h2776122.stratoserver.net)
2022-05-02 18:47:12 <geekosaur> == is equal. = is not quite what you think, though
2022-05-02 18:47:31 <geekosaur> single vertical bar can be read as "such that" (think math notation)
2022-05-02 18:50:17 <Xioulious> am i right in thinking that -> in haskell is where normally in C = is used?
2022-05-02 18:58:50 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
2022-05-02 19:00:31 <geekosaur> -> has multiple meanings
2022-05-02 19:00:58 <geekosaur> in a lambda or case-of it's roughly equivalent to =
2022-05-02 19:01:19 <geekosaur> in a type signature it separates the types of parameters, and parameters from the result
2022-05-02 19:01:41 <geekosaur> => separates constraints from parameters/result
2022-05-02 19:02:17 <geekosaur> a constraint is something which some type must abide by
2022-05-02 19:02:20 <geekosaur> :t (+)
2022-05-02 19:02:21 <lambdabot> Num a => a -> a -> a
2022-05-02 19:03:01 <geekosaur> any type `a` may be used as long as it has a Num instance. (if you've worked with Rust, they're called "traits" there)
2022-05-02 19:09:27 <Xioulious> not used to certain namings of stuff in programming as im just learning on my own :P but think i somewhat get it, im mostly trying to translate the haskell code into some other form of code that i know the layout/style of to learn the meaning of it all
2022-05-02 19:10:59 <Xioulious> like in C you would do Int value(Int number1, Int Number2) while in haskell you do Num value -> number1 -> number2, or something like that?
2022-05-02 19:16:04 <geekosaur> if you just want Int, you say Int
2022-05-02 19:16:42 <geekosaur> typeclasses allow functions to operate on any type which is a member of the typeclass. something like (+) is a typeclass method, where each type has to provide its own implementation
2022-05-02 19:17:06 <geekosaur> so we don't have to have a separate + operator for Double (which is what SML/NJ used to do), etc.
2022-05-02 19:20:39 <Xioulious> not sure why i cant find a guide/tutorial that mentions the basic stuff like that, they all seem to want to start with just calculating stuff
2022-05-02 19:23:29 <geekosaur> you have more important things to get used to before you reach typeclasses :) like laziness and IO
2022-05-02 19:27:07 <Xioulious> i usually kinda dive in, try to get some code to work and then figure out how/why it works, puts context to what gets explained then, but that can easily also be a bad idea
2022-05-02 19:28:37 <geekosaur> it works better when the language is just a fresh face on what you already know. haskell is different enough that it can get you into trouble quickly
2022-05-02 19:32:15 <Xioulious> true, ill just start at the first step in that link you gave, though first i need to get either emacs or vs code setup properly for it
2022-05-02 19:36:50 <liskin> M-elo-[m], geekosaur: subTabbed works by itself, there's no need for ComboP (it least that's how I use it)
2022-05-02 19:37:13 <geekosaur> they want terminals (only) to be in a tabbed layout
2022-05-02 19:37:24 <liskin> I still end up using tmux instead of that fairly often because… dunno, just like it more
2022-05-02 19:37:33 <geekosaur> so I figured ComboP to match the terminals by className and route them to a subTabbed layout
2022-05-02 19:38:10 <liskin> oh, I thought the usecase is just the ability to tab windows together in the WM
2022-05-02 19:50:29 <geekosaur> wee, gradually getting everything paired to new phone (went on sister's family plan yesterday, they also replaced 6yo phone with a middle-of-the-line phone with a working mike!)
2022-05-02 19:50:49 <geekosaur> getting more and more stuff out of my dwindling bank account
2022-05-02 19:53:07 <geekosaur> sadly all the headsets and such are as old as the phone is or older, so my main headset is looking to no longer be my main headset (it locked up hard when I accepted a call from the pharmacy)
2022-05-02 20:33:42 × x88x88x quits (~x88x88x@149.28.53.172) (Remote host closed the connection)
2022-05-02 20:42:35 x88x88x joins (~x88x88x@149.28.53.172)
2022-05-02 21:45:58 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1)
2022-05-02 21:56:54 × stackdroid18 quits (~stackdroi@user/stackdroid) (Quit: hasta la vista... tchau!)
2022-05-02 22:24:55 <abastro[m]> How does "rendering" in xmonad work?
2022-05-02 22:25:53 <liskin> abastro[m]: what do you mean by rendering?
2022-05-02 22:26:31 <geekosaur> we don't do rendering, that's up to the client (and the compositor if any). window managers are about window placement and focus policy
2022-05-02 22:26:38 <abastro[m]> E.g. treeselect, gridselect
2022-05-02 22:26:53 <abastro[m]> (E.g. calling GL is called rendering)
2022-05-02 22:27:16 <abastro[m]> Also tabbed layout does some rendering for the tabs
2022-05-02 22:27:37 <geekosaur> gridselect does do rendering but it uses X11 primitives. it's all pretty low level. see XMonad.Util.XUtils
2022-05-02 22:27:58 <abastro[m]> Oh, X11 primitives
2022-05-02 22:28:19 <abastro[m]> No way to render an icon then? :P
2022-05-02 22:28:25 <liskin> yep, treeselect as well, XFillRectangle and XDrawString and stuff :-)
2022-05-02 22:29:09 <geekosaur> mm, tabs can draw 2-color icons if given a list of lists of bools (ick)
2022-05-02 22:30:17 <abastro[m]> Oh, there are icons
2022-05-02 22:30:30 <abastro[m]> List of list of bools?
2022-05-02 22:30:32 <abastro[m]> Ouch
2022-05-02 22:30:44 <abastro[m]> So.. no one even bothered to depend on Array
2022-05-02 22:32:38 <abastro[m]> Eek, so it just... draws it
2022-05-02 22:32:57 <geekosaur> https://github.com/xmonad/xmonad-contrib/blob/master/XMonad/Util/Image.hs
2022-05-02 22:33:08 <geekosaur> yeh, just blasts bits
2022-05-02 22:33:26 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
2022-05-02 22:35:08 <abastro[m]> Guess I'd make a GTK application if I wanted tabs with proper icons
2022-05-02 22:36:55 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-05-02 22:40:27 <abastro[m]> Can I fork a OS thread as GTK application? XD
2022-05-02 22:42:53 <geekosaur> built into xmonad? technically yes, but you'd have to find a way for it to have its own event loop independent of the main one
2022-05-02 22:43:29 <geekosaur> the only way they could communicate is by client messages
2022-05-02 22:43:59 <abastro[m]> Does the GTK thread have to be main one?
2022-05-02 22:44:21 <geekosaur> I don't know gtk well enough to say
2022-05-02 22:44:38 <abastro[m]> Oh
2022-05-02 22:44:54 <abastro[m]> What do you mean by "own event loop independent of the main one" then?
2022-05-02 22:44:57 <geekosaur> I suspect not, as long as all work is done by one thread (you have onbe server connection, it cannot be multiplexed across threads)
2022-05-02 22:45:49 <geekosaur> xmonad has its own event loop. you cannot make use of it, you must open an independent server connection with its own event loop. they cannot communicate between each other except via client messages.
2022-05-02 22:46:13 <abastro[m]> Indeed
2022-05-02 22:46:15 <abastro[m]> Uhm wait
2022-05-02 22:46:24 × zawaken quits (~zawaken@user/zawaken) (Read error: Connection reset by peer)
2022-05-02 22:46:26 <abastro[m]> They cannot communicate with each other?
2022-05-02 22:46:58 <abastro[m]> Does MVars not work btwn the xmonad event loop and gtk event loop then?
2022-05-02 22:47:08 <geekosaur> if a gtk app is multithreaded then the other threads must post events back to the main gtk thread (whether this has to be the main app thread I don't know, but it certainly has to be the thread that owns gtk's server connection)
2022-05-02 22:47:10 zawaken joins (~zawaken@user/zawaken)
2022-05-02 22:47:34 <geekosaur> do you plan to rewrite the core to handle MVars?
2022-05-02 22:47:52 <geekosaur> it only processes X events currently
2022-05-02 22:48:48 <abastro[m]> Ehhh
2022-05-02 22:49:19 <abastro[m]> I was planning to let the local GTK app communicate with Xmonad through MVars.
2022-05-02 22:49:59 <abastro[m]> Idk about the X events handling and all, separate threads deserve treatment as separate threads
2022-05-02 22:50:02 <geekosaur> you cannot block the main loop on an MVar unless you can guarantee it will unblock in a timely manner
2022-05-02 22:50:50 <geekosaur> else you can block the entire UI because a window is not being placed while it's waiting on your MVar. and that much worse if the window in question was created by your GTk app
2022-05-02 22:51:44 <abastro[m]> Oh wait, right. Duh, I missed that part
2022-05-02 22:55:31 <abastro[m]> Can I periodically run a job in xmonad? geekosaur
2022-05-02 22:56:46 <geekosaur> not reliably
2022-05-02 22:57:14 <abastro[m]> Oh. :<
2022-05-02 22:57:24 <abastro[m]> How unreliable is it
2022-05-02 22:57:33 <geekosaur> xmonad only wakes up when it receives an X event, and since it only does window management that only happens when you open a new window, change focus, change workspaces, or similar
2022-05-02 22:58:33 <geekosaur> various things in contrib work around this by spawning a thread which sleeps a bit and sends a client message to the main loop, but this is somewhat unstable across restarts
2022-05-02 22:58:56 <abastro[m]> How about, close a new window
2022-05-02 22:59:17 <geekosaur> that also creates an event, yes
2022-05-02 23:04:27 <abastro[m]> geekosaur: How does treeselect works then?
2022-05-02 23:05:20 <abastro[m]> It at least needs to redraw couple of times
2022-05-02 23:06:44 × werneta quits (~werneta@137.79.197.49) (Ping timeout: 248 seconds)
2022-05-02 23:13:02 <geekosaur> most of those run their own private event loops on the hopeful assumption that nothing will require the main loop
2022-05-02 23:13:17 <geekosaur> most of them *should* hook handleEventHook instead
2022-05-02 23:20:13 <abastro[m]> I cannot find private event loop running on them

All times are in UTC.