Search found 41 matches
- Jan 4th, '18, 07:51
- Forum: Extending GP
- Topic: myZip and myZipWith functions ala haskell
- Replies: 8
- Views: 21432
Re: myZip and myZipWith functions ala haskell
worked like a charm! thank you! this block extension mechanism is totally awesome! we can share code, programs and whole libraries and it's so easy.
- Jan 3rd, '18, 06:40
- Forum: Extending GP
- Topic: myZip and myZipWith functions ala haskell
- Replies: 8
- Views: 21432
Re: myZip and myZipWith functions ala haskell
i've decided to upload my implementation of the luhn algorithm, if anyone's interested. Comments are welcome. i realize that there are many things about GP i still don't know. For starters, how do i put my often-used functions like myZip, myZipWith, sum, etc into some form of library so i dont have ...
- Jan 2nd, '18, 05:31
- Forum: Bugs
- Topic: cannot pass 16-digit number to function as string argument
- Replies: 2
- Views: 8398
Re: cannot pass 16-digit number to function as string argument
thank you! i wish i had known this sooner!
- Jan 2nd, '18, 00:58
- Forum: Bugs
- Topic: cannot pass 16-digit number to function as string argument
- Replies: 2
- Views: 8398
cannot pass 16-digit number to function as string argument
i was trying to pass a string of 16 digits as a string to a function but the argument is treated as a number , not as a string, so it becomes garbled. arglen_err.jpg converting the number string to a list argument works but i have to change the function logic accordingly, arglen_fix.jpg it also work...
- Dec 30th, '17, 03:41
- Forum: Extending GP
- Topic: myZip and myZipWith functions ala haskell
- Replies: 8
- Views: 21432
Re: myZip and myZipWith functions ala haskell
yes, i did, using myZip, myZipWidth and a couple of helper functions. and it validated 1234567812345670 and 49927398716 (fake numbers, of course) as good credit card numbers. i hesitate to upload the program because the problem is a perfect exercise for programmers learning a new language. taking 49...
- Dec 21st, '17, 04:54
- Forum: Extending GP
- Topic: myZip and myZipWith functions ala haskell
- Replies: 8
- Views: 21432
Re: myZip and myZipWith functions ala haskell
thanks for the advice - it's much simpler now.
here's the updated source:
- Dec 15th, '17, 04:11
- Forum: Bugs
- Topic: stop doesnt stop - it's more like pause. is this normal
- Replies: 2
- Views: 8171
stop doesnt stop - it's more like pause. is this normal
i built a 'when space pressed, STOP' block but it doesnt seem to work - either in the development mode or even the exported app. it seems to act like a no-operation or short pause. replacing it with HALT, will work, though. im running this in windows 10. is there something i'm missing?
- Dec 12th, '17, 07:33
- Forum: Extending GP
- Topic: myZip and myZipWith functions ala haskell
- Replies: 8
- Views: 21432
myZip and myZipWith functions ala haskell
when i learned about GP, i immediately tried to use it to encode the luhn algorithm that checks for good credit card numbers- but soon learned that GP did not have a zipWith function! so i wrote my own version. ( in haskell, zipWith (*) [2,3,4] [5,4,6] would return a list of [10,12,24].) zipwith cop...
- Dec 11th, '17, 04:09
- Forum: Experience Reports
- Topic: [browser]Solving ProjectEuler #19
- Replies: 1
- Views: 7702
Re: [browser]Solving ProjectEuler #19
i did it too - to practice coding in gp blocks . it was fun! i got the right answer using all the info supplied. while i was there i also solved the easy (to me!) ones: multiples of 3 and 5 https://projecteuler.net/problem=1 , sum square difference https://projecteuler.net/problem=6 and number lette...
- Dec 11th, '17, 03:52
- Forum: Requests
- Topic: how about a comment block that can contain also commands
- Replies: 1
- Views: 3404
how about a comment block that can contain also commands
i would use it to "comment out" intermediate debugging code, for example.
it can also serve as a garbage bag for sticking unused objects floating in workspace because they were dislodged, or they were trying out temporary code, etc, then when you've collected enough, just drag it out to delete.
it can also serve as a garbage bag for sticking unused objects floating in workspace because they were dislodged, or they were trying out temporary code, etc, then when you've collected enough, just drag it out to delete.