code logs -> 2016 -> Wed, 27 Jul 2016< code.20160726.log - code.20160728.log >
--- Log opened Wed Jul 27 00:00:22 2016
00:05 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
00:09
<&[R]>
Alek: JS strings are mutable
00:16
<@Alek>
meaning?
00:17
<&McMartin>
That you can change them such that the sequence I gave above with arrays also works
00:17
<&[R]>
Yes
00:56 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
01:02 catadroid [catadroid@Nightstar-b2e25b.dab.02.net] has joined #code
01:02 Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code
01:02 mode/#code [+ao Derakon Derakon] by ChanServ
01:10 gizmore [kvirc@Nightstar-l2ftk6.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
01:19
<&ToxicFrog>
Wait, they are?
01:19
<&ToxicFrog>
aaaaaaaaaa
01:19
< catadroid>
?
01:19
<&McMartin>
JS strings being mutable
01:19
<&ToxicFrog>
catadroid: JS strings being mutable
01:19
<&McMartin>
Which among other things would make them unsafe as dictionary keys
01:19
< catadroid>
Ah right
01:20
<&ToxicFrog>
I think of mutable strings as an idiosyncracy of C/++ these days
01:20
<&McMartin>
That said
01:20
<&McMartin>
I'm looking at a reference and all things that look like mutators say "returns a new string that"
01:20
<&McMartin>
So I'm going ot have to ask for a citation on this one before I believe it
01:21
< catadroid>
Yeah, it would surprise me if they were
01:21
< catadroid>
And yet at the same time it would not
01:21
<&McMartin>
JS is kind of in that unfortunate space, yes
01:21
<&McMartin>
Java offers several kinds of mutable strings, but java.lang.String itself is immutable
01:27
<&[R]>
You can modify a string as an array.
01:27
<&[R]>
Same as C
01:28
<&McMartin>
Can you give a sample for that? That implies APIs that I do not see in my documentation.
01:30 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
01:33
<&ToxicFrog>
McMartin, [R]: in my testing, subscript assignment works in the sense that it does not throw, but it also doesn't change the contents of the string.
01:35 Turaiel[Offline] is now known as Turaiel
01:42
<&[R]>
s = 'foo'; s[0] = 'F'; @mcmartin
01:45 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code
01:45 mode/#code [+o himi] by ChanServ
02:29
<@Alek>
thaaaaat doesn't work in my sandbox.
--- Log closed Wed Jul 27 02:36:22 2016
--- Log opened Wed Jul 27 02:41:31 2016
02:41 TheWatcher [chris@GlobalOperator.Nightstar.Net] has joined #code
02:41 Irssi: #code: Total of 37 nicks [32 ops, 0 halfops, 0 voices, 5 normal]
02:41 Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code
02:41 mode/#code [+o TheWatcher] by ChanServ
02:41 mode/#code [+ao Reiver Reiver] by ChanServ
02:42 Irssi: Join to #code was synced in 51 secs
02:44
<&[R]>
Odd i swear that used to work.
02:46
<&ToxicFrog>
I can easily believe that it worked (but shouldn't have) in certain browsers/browser versions in the past
02:46 Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has quit [Ping timeout: 121 seconds]
02:47
<&ToxicFrog>
Considering how often the approach to JS standards conformance has been "eh, fuck it"
02:48
<&[R]>
Yeah
02:50 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
02:50 mode/#code [+o macdjord] by ChanServ
--- Log closed Wed Jul 27 03:04:53 2016
--- Log opened Wed Jul 27 03:05:05 2016
03:05 TheWatcher [chris@GlobalOperator.Nightstar.Net] has joined #code
03:05 Irssi: #code: Total of 38 nicks [33 ops, 0 halfops, 0 voices, 5 normal]
03:05 mode/#code [+o TheWatcher] by ChanServ
03:05 Irssi: Join to #code was synced in 55 secs
03:35 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
03:35 mode/#code [+o mac] by ChanServ
03:37 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
03:57 Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code
03:57 mode/#code [+ao Derakon Derakon] by ChanServ
04:07 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds]
04:13 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:13 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:14 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
04:15 mode/#code [+o abudhabi] by ChanServ
04:19 catadroid` [catadroid@Nightstar-r5617l.dab.02.net] has joined #code
04:21 catadroid [catadroid@Nightstar-b2e25b.dab.02.net] has quit [Ping timeout: 121 seconds]
04:23 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds]
04:35 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
04:35 mode/#code [+o abudhabi] by ChanServ
05:04 Derakon is now known as Derakon[AFK]
05:49 Turaiel is now known as Turaiel[Offline]
06:47 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
07:00 Kindamoody[zZz] is now known as Kindamoody
07:44 Kindamoody is now known as Kindamoody|afk
07:50 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:55 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
08:22 catadroid` [catadroid@Nightstar-r5617l.dab.02.net] has quit [[NS] Quit: Bye]
08:22 ErikMesoy [Erik@Nightstar-hq72t5.customer.cdi.no] has quit [Ping timeout: 121 seconds]
09:45
<@simon>
any windows users here?
09:45
<@simon>
what's a painfree way to copy files from one directory to another as a scheduled task?
09:54
<@TheWatcher>
Write a .bat file that does `xcopy /s/e/y c:\from z:\to`, open the task scheduler, create basic task, give it a name, set up the trigger you want (daily, weekly, etc), set the time, ensure "start a program" is selected, select your batch file, click finish.
09:58
<@simon>
thanks, TheWatcher!
10:00
<@TheWatcher>
(/s tells it to do a recursive copy, /e includes empty directories, /y supresses confirmation for overwrites)
10:06
<@simon>
TheWatcher, right. so, uhm, when I've craeted a basic task, where does it go? it doesn't seem to be listed under "Active Tasks" or in the list to the left (2008 Server)
10:07
<@simon>
ah, it's in "Task Scheduler Library"
10:08
<@simon>
hm, the .bat file works, but clicking "Run" in the task scheduler doesn't.
10:10
<@simon>
ah, privileges.
10:10
<@simon>
okay, great.
10:11
<@simon>
and it's actually scheduled when it's sitting in Task Scheduler Library? I guess I'll find out. :)
10:14 catadroid [catadroid@Nightstar-r5617l.dab.02.net] has joined #code
10:14 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:14 mode/#code [+o himi] by ChanServ
10:15
< catadroid>
Oh Herb Sutter, I do love you so, but my heart is now functional...
10:49 catadroid` [catadroid@Nightstar-qdd4sv.dab.02.net] has joined #code
10:50 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
10:51 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
10:51 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
10:51 catadroid [catadroid@Nightstar-r5617l.dab.02.net] has quit [Ping timeout: 121 seconds]
10:58 catadroid` [catadroid@Nightstar-qdd4sv.dab.02.net] has quit [[NS] Quit: Bye]
10:58 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has joined #code
11:28
< catadroid>
Oh. So yes, it turns out that the problem I had programming in Haskell for so long is because I fundamentally didn't understand the execution model
11:34
< catadroid>
My mind is being turned inside out again
11:34
< catadroid>
Oh well
11:40 * TheWatcher replaces catadroid's mind with a tesseract on a turntable
11:41
< catadroid>
Replaces?
11:44
<@TheWatcher>
Heh :)
11:44 * Pi waves
11:45
<@Pi>
catadroid: Want to elaborate on that? Sounds like an interesting insight. :)
11:46 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
11:46 mode/#code [+o Emmy] by ChanServ
12:06
< catadroid>
Pi: before your explanation of what IO actions really are, it seemed impossible to me that Haskell could actually do anything at all that interacted with the outside world. Now that I understand the concepts behind lisp macros, the key thing that changed that view is that IO actions are irreducible literals and that evaluation is not execution
12:06
<@Pi>
Ah, cool.
12:07
<@Pi>
Yup. :)
12:07
< catadroid>
So now in my head, a Haskell program evaluation produces a list of actions, executing those actions being a single instance of a program run
12:07
<@Pi>
Yup!
12:07
< catadroid>
Essentially my model now is that Haskell code is a giant macro and it reduces to a single IO action that may contain composite actions that are sequenced
12:08
<@Pi>
Right.
12:08
< catadroid>
That's actually incredibly powerful
12:08
<@Pi>
(A macro only in the sense of being non-strictly evaluated, of course.)
12:08
< catadroid>
I did not realise how alien side effects actually are when you think about what they do
12:08
<@Pi>
Yeah, they really are.
12:08
< catadroid>
Sure, macro in a LISP sense
12:09
< catadroid>
So the macro itself may perform 'compile time' evaluation itself, but it produces more choice to be evaluated / executed
12:09
< catadroid>
And the conflation of evaluation and execution is something that I believe can hurt understanding of code, now
12:10
<@Pi>
For sure.
12:10
<@Pi>
Separating them is amazingly clarifying.
12:10
<@Pi>
And simplifying.
12:10
< catadroid>
Aye. That's the step that's done the mind blowing
12:10
<@Pi>
This is what I mean when I say I think in Haskell when I work in other languages.
12:10
<@Pi>
Once you see that structure you can't unsee it.
12:10
< catadroid>
And also the concept that I've never seen explained
12:10
< catadroid>
Until you did
12:11
<@Pi>
So I usually manage my effects as I would in Haskell, even though the language typically don't give you the assistence that Haskell does.
12:11
< catadroid>
Because one of the key things basically every programmer learns is that functions may also be actions
12:11
<@Pi>
And that results in much cleaner and simpler code, most of the time.
12:11
< catadroid>
And actually, they're separate concepts
12:12
< catadroid>
Presumably, this means that Haskell libraries can provide new black box actions?
12:12
<@Pi>
So many design patterns and effective development strategies in imperative and OO languages come down to "approach what you would do in Haskell (or similar)" :)
12:12
< catadroid>
Which is how you can interact with, eg, graphics hardware
12:12
<@Pi>
Yeah.
12:12
< catadroid>
I still am not sure I can forgive you :p
12:12
<@Pi>
For example, if you wrap C libraries with the FFI, you can expose those as IO actions
12:13
< catadroid>
(although I'm being facetious, that's actually really cool)
12:13
< catadroid>
I love gaining this kind of insight
12:13
<@Pi>
GHC's own primitive IO actions are also just low-level Haskell code at the end of the day.
12:14
<@Pi>
And you can open them up and muck about with the internals if you really want to.
12:14
< catadroid>
I want to play more with it now, though
12:14
<@Pi>
(It's all really low-level, though, and needs familiarity with GHC internals, of course)
12:14
< catadroid>
Which is annoying, because I was enjoying playing with clojure
12:14
<@Pi>
But you don't need to know that to use IO actions: they're just a type and an API, and every Haskell implementation can implement it differently.
12:14
< catadroid>
Not that I can't do both, of course
12:15
< catadroid>
Yeah, they're essentially machine code with annotations
12:15
< catadroid>
You learn the verbs of your system the same way you learn numeric values
12:16
< catadroid>
Just in this case, that's much more explicit
12:17
<@Pi>
:)
12:17
<@Pi>
If you like this, I can't wait to introduce you to the really mind-blowing bits that come later.
12:20
< catadroid>
That feels patronising, but I think that's just my lack of self confidence
12:23
<@Pi>
I don't mean to be patronising, sorry.
12:23
<@Pi>
Haskell is just really mind-blowing, and it never really stops doing that.
12:23
<@Pi>
There's so much built in it.
12:24
<@Pi>
That's why I'm so passionate about it!
12:29
<@simon>
there's just so many abstractions you can always learn new ones.
12:32 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
12:32 mode/#code [+o macdjord] by ChanServ
12:33
<@simon>
there's this guy, OCharles, who made a series of christmas calendars called 24 days of (GHC Extensions|Hackage) where he introduced a new feature every day throughout christmas.
12:34 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
12:34
<@simon>
he did it for three years.
12:35
<@simon>
since Haskell has become such a hotbed of PLT, you'll find state-of-the-art abstractions implemented and ready for use in production. I think this must've been how Lisp felt like years ago.
12:35
<@simon>
community-wise.
12:37
<@Pi>
Yeah. It really is the world's premier PLT engineering lab, really.
12:38 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
12:38 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:38 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
12:39
<@simon>
here's a pretty cool one: https://ocharles.org.uk/blog/guest-posts/2014-12-06-rebindable-syntax.html
12:43
<@simon>
I think it's nice that you can learn Haskell with basic knowledge of the type system, or with this category theoretical perspective, and you can learn one from the other or vice versa.
12:44
<@simon>
"Another thing you might be wondering is if we can replace >>= with =>>, and return with extract (from Control.Comonad) and get some meaningful expression from it. The short answer is: Not really."
12:46
< catadroid>
I currently feel like I'm worthless and know nothing, which is depressing. And entirely my own issue to deal with
12:46
<@simon>
I taught a Haskell course for four years, and I still feel so stupid when I'm on #haskell at freenode.
12:46
<@simon>
s/taught/TA'ed/
12:46
< catadroid>
And I want to learn new things, I just feel so much like the time I've spent focusing so hard on C++ is wasted due to how... basic it feels in terms of expressive power
12:48
<@Tamber>
"*ding* You have reached the first stage of enlightenment."
12:49
<@simon>
I'm sure it's not wasted. it probably just takes a while for the parallels to come clear. (I don't know C++, but knowing Haskell makes me a better C# programmer for certain.)
12:49
< catadroid>
It's not wasted at all
12:50
< catadroid>
This isn't really objective truth speaking, it's the effects of depression
12:50
<@simon>
ok
12:50
< catadroid>
So it's not even really related to programing at all, just that's what I'm looking at this minute
12:50
< catadroid>
Sorry, this isn't really the channel for this introspection
12:50
< catadroid>
Now I've identified it I'll be quiet
12:50
<@simon>
:)
12:52
<@simon>
I've settled with math as a minor because it made me feel too stupid. now I just read it at my own rate and find more enjoyment from it.
12:52
< catadroid>
I do actually feel like I could write a short introduction to how to use Haskell for programmers that would undo the damage done by people attempting to explain monads
12:53
<@simon>
you probably could.
12:53
< catadroid>
Although I want to get a lot more practice with the basic concepts before I would attempt that
12:53
<@simon>
just never use the word monads. :P
12:53
< catadroid>
Quite
12:54
<@simon>
have you read "Abstraction, intuition and 'the monad tutorial fallacy'"? it's a blog post: https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tut orial-fallacy/
12:55
<@simon>
s/'the /the '/
12:57
< catadroid>
Yes, in fact I internalised its ideas as my default teaching method
13:01
<@simon>
nice. I miss teaching.
13:02
<@simon>
I stopped because I'd been TA'ing for so long I started to doubt if I could even write code any more.
13:08 Turaiel[Offline] is now known as Turaiel
13:12
< catadroid>
It's more mentoring really
13:33
<@Pi>
Amen about the above.
13:33
<@Pi>
That's why I'm so adament about saying "IO action", not IO monad.
13:33
<@Pi>
*Especially* in context where the monadic functionality isn't even being used.
13:33
<@Pi>
(Like the entire discussion / tutorial yesterday)
13:34 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
13:34 mode/#code [+qo Vornicus Vornicus] by ChanServ
13:36
<@TheWatcher>
simon: Actually, teaching has actually helped to improve my code. It's made me actually look at some things I'd learnt years ago that proved to be incorrect, as well as made me learn and appreciate some of the subtlties of low-level stuff in c and c++
13:36 * TheWatcher eyes those actuallys, has some of the shot
13:37
<@Pi>
Teaching is incredibly rewarding. :)
13:37
<@Pi>
I've hung out in places like #haskell-beginners for years.
13:37
<@Pi>
And #lambdanow more recently.
13:37
<@Pi>
(Both Freenode)
13:37
<@TheWatcher>
Yeah, it is.
14:19 Turaiel [Brandon@Nightstar-7mqsi0.mi.comcast.net] has left #code ["Leaving"]
14:21
<@simon>
hmm, guy interviewed at job was a string theoretician
14:22
< catadroid>
Was he mutable?
14:22
<@simon>
apparently he had never touched programming.
14:22
<@simon>
it's funny how really smart people think they don't need any practical skills to apply for jobs :P
14:23
<@TheWatcher>
What was he applying for?
14:23
<@simon>
quantitative analyst
14:23
<@simon>
there's a lot of programming though
14:24
<@simon>
neural networks, lots of tweaking of statistical modelling. so very practical, really.
14:24
<@TheWatcher>
Well, it's just like maths, right?~
14:27
< catadroid>
It's very similar to law, I hear
14:28
<@TheWatcher>
(I've actually had a physicist say that to me about programming...)
14:28
< catadroid>
Isn't it a lot like martial arts?
14:28
< catadroid>
Or Mexican food? I heard there are burritos!
14:28
<@TheWatcher>
Mmm, burritos.
15:03
<&ToxicFrog>
Pi: just wanted to thank you for all the Haskell burbling, it's explained a lot of things that I didn't really get before.
15:06
< catadroid>
Easy as Pi I suppose o:
15:06
< catadroid>
Just needed to circle around and come at it from a different angle
15:06 * ToxicFrog ded
15:08
<@Pi>
ToxicFrog: My pleasure!
15:08
<@Pi>
I could burble Haskell all day long. :3
15:08
< catadroid>
That's good x)
15:09
< catadroid>
Because there's a lot I would love to learn about it
15:09
<@Pi>
Well, you can always prompt me!
15:09
<&ToxicFrog>
My burbling tends to be lua or clojure flavoured; haskell is one of those languages I've poked at repeatedly over the years but have never been productive in or really felt like I understood.
15:16 * TheWatcher args, stabs the central timetabling team until they stick to their own godsdamned rules
15:20
<@TheWatcher>
I had the perfect code to determine academic year dates! It handled Easter correctly, it didn't blink about working out when christmas break started and finished! Its calculated dates matched the last 25 years; as many years as I could get data for. Until this bloody year, where they shifted everything by a week for no reason
15:29
< Pink>
hah
15:30
< Pink>
You know what they say about idiot proofing versus the universe's ability to evolve better idiots.
15:42 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has quit [The TLS connection was non-properly terminated.]
15:42 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has joined #code
16:21 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has quit [[NS] Quit: Bye]
16:28 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has joined #code
16:28
< catadroid>
Hm. I need to play with the idea of IO actions for a bit
16:29 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Connection closed]
16:30 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
16:30 mode/#code [+o abudhabi] by ChanServ
16:56
<@Pi>
catadroid: Let me know if you have any questions!
17:20 catadroid` [catadroid@Nightstar-pb0.jtr.132.82.IP] has joined #code
17:23 catadroid [catadroid@Nightstar-qdd4sv.dab.02.net] has quit [Ping timeout: 121 seconds]
17:30 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
17:42 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has joined #code
17:42 mode/#code [+o celticminstrel] by ChanServ
18:03
<&McMartin>
re: Haskell feeling now like how Lisp used to feel - both started out as notations for publishing papers about functional programming, so this would make sense
18:04
<@simon>
http://sigtbd.csail.mit.edu/pubs/veryconference-paper10.pdf -- the dating problem is solved!
18:04
<@simon>
but there's something I don't understand:
18:04
<@simon>
"Alice generates two residues x and y modulo N. x consists of 0 (with some suitable padding scheme applied), and y consists of Alice's response (0 if her response is No, 1 if her response is Yes)."
18:04
<&McMartin>
That said, I've either sadly lost the capacity for wonder or found it in other contexts, because the way I finally got a grip on Monad and related types was "oh, Haskell is batteries included"
18:05
<@simon>
McMartin, what does batteries included mean?
18:05
<&McMartin>
Crudely, "rich standard library"
18:06
<@simon>
I know there's a distribution of OCaml called "Batteries Included".
18:06
<@simon>
ah, right
18:07
<&McMartin>
Less crudely, a standard library that is rich and generic enough that you'll be mixing it in with your own code seamlessly.
18:09
<&McMartin>
Also, I had already done work with lazy-evaluated languages, so the specific bit that's been the topic here wasn't new on its face - it was instead effective use of it that was where I struggled.
18:09
<&McMartin>
And I was expecting to learn something transformational with it at the same level as when I learned Lisp lo these many years ago
18:09
<&McMartin>
Which is kind of the "here is a new, large, thing that once you've learned it, changes everything"
18:10
<&McMartin>
But it seems the experience I should have been looking for with Haskell was more like, well, https://www.youtube.com/watch?v=uCgnWqoP4MM
18:11
<&McMartin>
(Also, part of my experience with these things tends to include a step along the lines of "Okay, so, you've gone on your journey, what have you brought back" and the answer there seems to be "you should be able to transform your data structures to and from lists in a structurally-preserving way, and here are even more things you can do with lists")
18:27
<@simon>
I guess a lot of the cool features of Haskell focus on expression, e.g. embedding certain design patterns, algorithms and datastructures into an idiomatic, concise way of doing things. beginners in Haskell will write it like it's an ML without bells and whistles (lots of explicit recursion, lots of function parameters), and seasoned Haskell programmers will write things that are monoidal and pointfree and such
18:27
<@simon>
.
18:29
<@simon>
my experience with my co-workers who are already quite good at programming when they see Haskell for the first time is that they don't really see the point.
18:29
<@simon>
(quite good = better than me)
18:29
<&McMartin>
It says "point-free" right there
18:29
<&McMartin>
>.>
18:30
<@simon>
what?
18:30
<@simon>
oh. :)
18:30
<@simon>
the point is that there is no point!
18:31
<&McMartin>
OK, then, for reference, I picked up point-free almost instantly once it was introduced. "Right, I suppose that does fall out of currying and partial evaluation"
18:31
<@simon>
no really, I think more generic (mathy) design patterns => better standard library. I think that's really the winning argument in favor of Haskell, for me.
18:31
<@simon>
yeah, sure.
18:31
< catalyst>
Transducers feel like a pointfree kind of concept
18:31
<@simon>
yep
18:32
<&McMartin>
And the syntax being concise and elegant for certain patterns is true of both Haskell *and* ML, actually...
18:32
<&McMartin>
... and is part of why I don't think there's a Tenth Law for it
18:32
< catalyst>
I still feel like LISP's syntax being literally an AST makes it feel qualitatively different
18:32
<&McMartin>
I think that's a conventional and valid opinion
18:33
<&McMartin>
That's why you need a separate "Template Haskell" and why it's kind of terrifying
18:33
<@simon>
are there even any other homoiconic languages worthy of mentioning?
18:33 * catalyst feels like this got heated
18:33
<&McMartin>
oh my, etc
18:34
<@simon>
I mean besides Lisp/Scheme/etc.
18:34
<&McMartin>
It's tricky because as soon as you write one you *might as well* make it a Lisp
18:34
<@simon>
right :)
18:34
< catalyst>
assembly? makes me wonder if there's some sort of order variable involved
18:35
<@simon>
maybe a better question is, are there any other syntaxes for Lisp that are still homoiconic, but less full of parentheses? ;)
18:35
<@simon>
catalyst, hehe
18:35
<@Tamber>
I'm sure you could make a version that swaps the parens for curly-brackets~ :p
18:35
<&McMartin>
There are assemblers that take S-expressions as input, but they aren't homoiconic~
18:35
<&McMartin>
Tamber: There's an infix syntax for Scheme
18:36
< catalyst>
But it's all integers, right? :3
18:36
< catalyst>
I'm actually being kind of serious
18:36
<@Tamber>
It's all just voltage on a bit of wire, in the end, right?
18:36
<@Tamber>
:p
18:36
<&McMartin>
Aha
18:36
<&McMartin>
In that case
18:36
<&McMartin>
Not assembly
18:36
<&McMartin>
Machine code is in fact homiconic
18:36
<&McMartin>
*homoiconic
18:36
< catalyst>
ah, okay
18:37
< catalyst>
But if, say machine code is order 1, and LISP is order N (2?) then what's the order N+1 homoiconic language (if such a concept is relevant)?
18:37
<&McMartin>
I should be bowing out soon, but my initial reflexive reaction is "something with self-describing annotations"
18:38
<&McMartin>
Probably because we've been talking Haskell and I've been playing with Rust =P
18:38
<@simon>
McMartin, you mean a typed language?
18:40
<&McMartin>
Yes, but in the more expansive notion of type than the usual one used in coding.
18:42 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
18:44 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has joined #code
18:44 mode/#code [+o celticminstrel] by ChanServ
18:52 catadroid` [catadroid@Nightstar-pb0.jtr.132.82.IP] has quit [[NS] Quit: Bye]
18:54 * catalyst is beginning to see type as orthogonal to data layout now, which is nice
19:19
<@celticminstrel>
Oh! Somehow I finally got the text to work.
19:19
<@celticminstrel>
Except it's upside down.
19:19
<@celticminstrel>
Presumably that just means I need to reorder the vertices or something.
19:19
<@celticminstrel>
Or the texture coordinates.
19:20
<~Vornicus>
YAY TEXT
19:21
<~Vornicus>
(does your text say "YAY TEXT"? If not, you're still doing it wrong)
19:21
<@celticminstrel>
Pffft.
19:21
<@celticminstrel>
Next step is to not use immediate mode, because that was removed in OpenGL 3 or something.
19:22
<@celticminstrel>
Though for some reason my other rendering also wasn't working when I ask SDL to use OpenGL 3.
19:29
<&McMartin>
The setup APIs are totally different, and SDL 1.x doesn't support OpenGL beyond 2.x at all.
19:29
<@celticminstrel>
I'm using SDL2.
19:31
<@celticminstrel>
And I'm using glVertexPointer with glDrawArrays to draw a vertex array.
19:31
<@celticminstrel>
(That's what I'm now going to convert the text rendering code to use.(
19:31
<@celticminstrel>
^)
19:32
<@celticminstrel>
Though, if I recall correctly, when requesting GL3 even the clear colour doesn't work...
19:33
<@celticminstrel>
I recall incorrectly.
19:33
<@celticminstrel>
It's the only thing that works though.
19:33
<@celticminstrel>
But if I request GL3 compatibility I just get a black screen. (The clear colour is currently green.(
19:36
<@celticminstrel>
It seems like the reason my text didn't work is because the vertex colour was transparent.
19:37
<@celticminstrel>
If it's not transparent, it blends with the text colour...
19:38
<@celticminstrel>
I guess making it white is best...?
19:38
<&McMartin>
I think you blend the vertex colors with the texture colors
19:38
<&McMartin>
So if the texture OR the vertex is transparent, that means the face is
19:39
<@celticminstrel>
So if the vertex colour is white, will I end up with just the texture colour?
19:40 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has quit [Connection closed]
19:40 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has joined #code
19:40 mode/#code [+o celticminstrel] by ChanServ
19:40
<@celticminstrel>
Did I miss anything?
19:40
<@celticminstrel>
And did my last message get through?
19:41
<~Vornicus>
<celticminstrel> So if the vertex colour is white, will I end up with just the texture colour?
19:41
<@celticminstrel>
Okay, good.
19:42
<&McMartin>
It did
19:42
<&McMartin>
And the answer is "that is my vague recollection of how it works"
19:42
<~Vornicus>
that's the standard way of doing it, yes. I know it used to be that one way to do lighting was to change the color of a particular vertex
19:43
<&McMartin>
That's actually what my old terrain demo did
20:13
<&McMartin>
(The rewrite does it in the pixel shader so it's more like Phong lighting than Goraud shading)
20:13
<&McMartin>
(Goraud (sp?) was the per-vertex one)
20:15
<@gnolam>
(Gouraud.)
20:16
<@gnolam>
(I remember when Gouraud shading was something you actually advertised. I feel old.)
20:17
<&McMartin>
I don't, but I do remember it for Phong
20:17
<&McMartin>
Back then Phong usually wasn't done in hardware, though
20:30
<@Pi>
http://www.inwap.com/mf/reboot/cast/img/phong.jpg ~
20:31
< catalyst>
Dat Phong, Ph-Phong Phong Phong
22:02
<@Alek>
oh, is that from the reboot reboot?
22:02
<@Alek>
or the original?
22:40 Kindamoody|afk is now known as Kindamoody
23:14
<&jerith>
Original, unless ther reboot reboot has a very similar aesthetic.
23:49 celticminstrel is now known as celmin|away
--- Log closed Thu Jul 28 00:00:37 2016
code logs -> 2016 -> Wed, 27 Jul 2016< code.20160726.log - code.20160728.log >

[ Latest log file ]